
134 N.W.2d 851 (1965)
Norman HOLIEN, Plaintiff and Appellant,
v.
Targie TRYDAHL, Administrator of the Estate of John Holien, Deceased, Caroline G. Holien, Kenneth John Holien, Carol Erickson, Ruth Holien, Shirley Holien, Betty Holien, Margaret Holien, and Sondra Holien, heirs at law of John Holien, Deceased, Olga Torgerson, Ray Wentzel, Executor of the Estate of Augusta Holien, Deceased, and Harland [sic] L. Holien, Defendants and Respondents.
No. 8158.
Supreme Court of North Dakota.
March 4, 1965.
Rehearing Denied April 3, 1965.
*852 Stokes, Vaaler, Gillig & Warcup, Grand Forks, for plaintiff and appellant.
Letnes, Hansen & Murray, Grand Forks, for defendants and respondents except Ray R. Wentzel, executor of estate of Augusta Holien.
STRUTZ, Judge.
Augusta Holien died leaving a will devising her real estate to various heirs. After the terms of the will which disposed of all of her property, she added a further clause, designated as Section 11, which reads as follows:
"It is my further will that my son Norman shall have the first right to purchase any of the real estate which constitutes an asset of my estate, provided the same is put up for sale by *853 any of the beneficiaries under my will at a price equal to that which they may obtain from any other bona fide purchaser."
The facts in this case are not in dispute and, in fact, were stipulated by the parties. It was stipulated that an agreement and assignment of interest in the estate was entered into by which John Holien, one of the devisees, sold and assigned his interest in the real estate in question to Olga Torgerson, another of the devisees, and that an agreement and assignment of interest in the estate was entered into by Harlan Holien under the provisions of which the said devisee also sold and assigned his interest in the real estate in question to Olga Torgerson. It was further stipulated that, on being advised of such purported agreements and assignments, the plaintiff served notice upon Harlan Holien and John Holien that the plaintiff elected to purchase their interests in the said real estate under the provisions of Section 11 of the Last Will and Testament of Augusta Holien. It was further stipulated that, prior to the execution of such agreements and assignments, Olga Torgerson had knowledge of the terms of the Last Will and Testament of Augusta Holien, including the provisions of Section 11. It was also stipulated and agreed that a final decree of distribution in the estate of Augusta Holien had not been entered in the probate proceeding at the time of the trial of this action.
The plaintiff in his complaint demands specific performance of the provisions of Section 11 of the Augusta Holien will, which plaintiff refers to as an option to purchase.
The defendants contend that the plaintiff's complaint fails to state a cause of action; that the district court is without jurisdiction to determine the issues raised by the plaintiff's complaint because final decree has not been entered in the estate of Augusta Holien, deceased, and that the county court of Grand Forks County, where such probate proceedings are pending, is the only court with jurisdiction to enter any order affecting the title to the real property in the estate; and that, in any event, the provisions of Section 11 of the Last Will and Testament of the deceased could not be enforced by specific performance.
The trial court decreed that the plaintiff is not entitled to specific performance; that the devisees under the will of the deceased were the recipients of fee-simple titles in and to the real property devised to them, subject to the probate of said estate, and that the alleged "option," as described in Section 11 of the will, is in restraint of alienation of fee-simple title given to the devisees under the will and therefore of no effect.
From the judgment dismissing plaintiff's complaint, the plaintiff has appealed to this court, demanding a trial de novo.
We first will consider the defendants' contention that the district court was without jurisdiction to determine the issues raised by the plaintiff's complaint because a final decree had not been entered in the estate of Augusta Holien, deceased, and that the county court of Grand Forks County, where probate proceedings are pending, is the only court with jurisdiction to enter any order affecting the title to the real property in the estate. The defendants cite Bronson v. Johnson, 76 N.D. 122, 33 N.W.2d 819, in support of their contention. In the Bronson case, this court held that, when an estate of a testator is in the course of administration in a county court, a district court has no jurisdiction to entertain an action in which the only relief sought is a declaratory judgment construing a testator's will "in aid of administration." The basis of this ruling is obvious. The county court has jurisdiction to interpret the provisions of the will in the course of administration, and, where the only relief sought is the construction of a provision of the will in aid of administration of the estate in the county court, it is exclusively a testamentary matter and the district court *854 has no jurisdiction until an appeal is taken from the county court's construction of such provision.
In the case before us, however, the plaintiff is not seeking a declaratory judgment construing the provisions of the testatrix's will in aid of administration of the estate. He is seeking affirmative relief against certain of the devisees, which relief cannot be given by the probate court. It therefore is our opinion that the trial court did have jurisdiction, in an appropriate action, to determine the issues raised by the plaintiff's complaint.
The defendants also point out that the plaintiff's action is one for specific performance against certain of the defendants who are devisees under the testatrix's will and that specific performance will not lie, in this case, under our laws and the decisions of this court. It may be true that specific performance is not the proper remedy, but that fact will not benefit the defendants. If the plaintiff is entitled to relief of any kind, the court should grant him that relief even though his prayer for relief is for specific performance and even though specific performance cannot be granted.
Rule 54(c) of the North Dakota Rules of Civil Procedure provides, in part:
"Except as to a party against whom a judgment is entered by default, every final judgment shall grant the relief to which the party in whose favor it is rendered is entitled, even if the party has not demanded such relief in his pleadings."
Thus, if the plaintiff is entitled to any relief at all, it will be given to him even though the relief for which he prays in his complaint cannot be granted. Under this rule, the judgment in a contested case is based on what has been proved, not on what has been pleaded. As is pointed out in Barron & Holtzoff, "Federal Practice and Procedure," Volume 3, at page 35, where the identical rule is discussed, this rule is necessary in a system where law and equity are merged. Any other rule would mean a preservation of the distinctions between law and equity. Once a case is in issue, the demand in the pleadings loses much of its restrictive force. Particular legal theories of counsel are subordinated to the court's right and duty to grant the relief to which the prevailing party is entitled, whether he has demanded that relief or not. If the party has proved a claim for any relief, the court will grant that relief regardless of what he calls his claim and regardless of his prayer for relief. The question is not whether the plaintiff has asked for the proper remedy, but whether he is entitled to any relief.
Thus, where the plaintiff has demanded specific performance and specific performance cannot be granted to him, he will be given any other relief to which he may be entitled. The question which we must determine, therefore, is whether the plaintiff is entitled to any relief in this case.
In Section 3 of the will, the testatrix disposed of all of the residue of her real estate, except such as had been devised in the previous sections of the will, in the following manner:
"The balance of my real estate consisting of 320 acres of land and described as the Southwest Quarter (SW¼) of Section Sixteen (16) and the Southeast Quarter (SE¼) of Section Twenty (20), all located in Walle Township, I give, devise and bequeath as follows: * * *."
Following the quoted portion of Section 3, we find the disposition of such real estate in undivided portions, including an undivided three-sixteenths to the defendant John Holien, an undivided three-sixteenths to the defendant Olga Torgerson, and an undivided two-sixteenths to the defendant Harlan Holien.
Following Section 3 of the will are other sections providing for the payment of debts, a clause disposing of any residue of the estate in the same proportions as disposition *855 was made of the real estate in Section 3, disposition of certain property in the estate in the event of death of certain devisees, and then the penultimate provision of the will, Section 11, which reads as follows:
"It is my further will that my son Norman shall have the first right to purchase any of the real estate which constitutes an asset of my estate, provided the same is put up for sale by any of the beneficiaries under my will at a price equal to that which they may obtain from any other bona fide purchaser."
Does this provision give to the plaintiff, Norman Holien, any right which may be asserted in an appropriate action against the devisees under the will? If it does, the court should grant to the plaintiff such relief to which he may be entitled, even though he prayed for relief which cannot be given to him. Or are the provisions of Section 11 an attempt on the part of the testatrix to attach a condition to the devises previously made in the will, which condition is repugnant to the interests given in Section 3?
The trial judge held that various devisees had been given, in Section 3, a fee-simple title, and that the subsequent attempt of the testatrix to limit the power of the devisees to dispose of such interests is in restraint of alienation of such fee-simple title, and therefore void.
The absolute ownership of property implies the right of arbitrary disposition by a capable person. Sec. 47-02-02, N.D.C.C.; Hendricks v. Porter, N.D., 110 N.W.2d 421.
Thus the testatrix, as the absolute owner of the real estate described in Section 3 of her will, had the absolute right to dispose of it as she saw fit. She saw fit to "give, devise and bequeath" such real property to the devisees named. What kind of an estate did these devisees get in that property?
It has been held that the words "give, devise, and bequeath" pass the fee simple title to devisees named. Aneshaensel v. Twyman, 42 Ind.App. 354, 85 N.E. 788.
We do not believe that it may be successfully contended that, under the provisions of Section 3 of the will, the devisees John Holien, Olga Torgerson, or Harlan Holien did not receive fee-simple title to their share in such real estate, and that their respective interests were contingent and not vested. It is generally held that a condition in a devise that the devisee shall not alienate is void because it is repugnant to the estate granted. 96 C.J. S. Wills § 980a, p. 467.
Thus the general rule is that, where an estate in fee simple in real estate is given by will, an attempted testamentary restraint on the devisee's power of alienation is void as repugnant to the nature of the estate given. Our Legislative Assembly has enacted legislation pertaining to restraint of alienation. Section 47-02-26 of the North Dakota Century Code provides:
"Conditions restraining alienation, when repugnant to the interest created, are void."
Here, the interest created was a fee-simple title. Are the provisions of Section 11 of the will, by which the testatrix attempts to restrain the right of alienation to the extent that, before such interests may be sold by the devisees to anyone but the plaintiff, he must be given first chance to buy, repugnant to the interests given to them by Section 3 of the will? It has been held that any restraint upon alienation by an owner in fee, which restrains such fee owner from selling to anyone except other devisees, is void. Carpenter v. Allen, 198 Ky. 252, 248 S.W. 523.
Restrictions against alienation of property devised in fee are void. Friswold v. United States National Bank of LaGrande, 122 Or. 246, 257 P. 818; Frame v. Whitaker, *856 120 Tex. 53, 36 S.W.2d 149; Dunlop v. Dunlop's Executors, 144 Va. 297, 132 S.E. 351; Andrews v. Hall, 156 Neb. 817, 58 N.W.2d 201, 42 A.L.R.2d 1239; Williams v. McPherson, 216 N.C. 565, 5 S.E.2d 830.
Thus the right of alienation is an inherent and inseparable quality of fee-simple estate, and any restraint thereon is void. Here, the testatrix passed title of the real estate in fee simple by the words "give, devise and bequeath" the real estate to the devisees named in Section 3. Such absolute title carried with it the power to make any disposition of the property which the devisees might see fit to make, and the attempt of the testatrix to limit such power of alienation, by the subsequent provisions of Section 11 of the will, is a condition repugnant to the interests created, and therefore void.
For reasons stated herein, the judgment of the district court is affirmed.
BURKE, C. J., and TEIGEN and ERICKSTAD, JJ., concur.
KNUDSON, J., not having been a member of the Court when the case was submitted, did not participate.

On petition for rehearing.
STRUTZ, Judge.
The plaintiff has filed a petition for rehearing, claiming that the right to have first opportunity to buy any of the property devised to other devisees is an option, and therefore a mere privilege, citing the decision of this court in Larson v. Wood, 75 N.D. 9, 25 N.W.2d 100. He further claims that, as an option, it is not a condition limiting the right of alienation.
We do not believe that the provision in the will creates an option. An option is an agreement by which the owner of property gives to another the privilege of buying the property "at a specified price within a specified time." American Law of Property, Vol. III, Sec. 11.17, p. 47. It is a "contract" by which the owner of property agrees with another that the latter shall have the right to buy the property at a fixed price within a specified time on agreed terms. 91 C.J.S. Vendor and Purchaser § 4, p. 832.
While it is true that an option to purchase has been held by this court to be a mere privilege, we do not believe that the attempted right given to the plaintiff in the testatrix's will was an option, but was an attempt to impose a condition on the interests devised.
The plaintiff also contends that since the beneficiaries of the will, the devisees named as defendants in this action, could sell their property at any time to anyone, by merely giving to the plaintiff first chance to buy, there was no condition restraining alienation which would be repugnant to the fee-simple interests created. We do not believe that this contention has any merit. The property was devised in fee simple. Any limitation on the right of alienation, even the slightest, would be a condition repugnant to the interests created and would be void under Section 47-02-26, North Dakota Century Code. Here, we find no provision as to what would happen to the titles if the devisees failed to give the plaintiff first chance to buy. Had the testatrix given the devisees defeasible titles, then the devises would have been subject to the plaintiff's privilege of first chance to buy. But where the devisees are given fee-simple titles, conditions cannot be imposed restraining alienation. Langsten v. Wooten, 232 N.C. 124, 59 S.E.2d 605. A restraint upon free and unlimited power of alienation, attached to a devise in fee, is void since the right of alienation is an inseparable incident to an estate in fee.
Petition for rehearing is denied.
BURKE, C. J., and ERICKSTAD and TEIGEN, JJ., concur.
