delivered the opinion of the court.
The facts alleged in the complaint herein and admitted by the motion to dismiss it on the ground of its insufficiency, are as follows:
The. defendant Américo Andrini and Bernabela Cruz lived in open concubinage during the years 1910 to 1934 and ■out of that union there were born the seven plaintiffs herein, who were registered in the civil registry as natural children of Bernabela. The defendant has always treated them as his children, providing for their support and education and maintaining the relationship of parent and child with each of them ever since they were born until the present time; but he has refused to acknowledge them as natural children “for the purpose of bearing the surname of the father in addition to that of the mother.” They pray for judgment declaring all the plaintiffs to be acknowledged natural children of Américo Andrini and Bernabela Cruz and ordering the recording of such acknowledgment in the margin of the birth record of each of the plaintiffs.
The alleged insufficiency of the complaint is predicated on the failure to affirmatively allege that the parents of the plaintiffs could have contracted marriage at the time of the conception and birth of each of the latter. The defendant *121maintains that such an allegation is necessary in order to state a cause of action, the more so since in the prayer of the complaint the plaintiffs ask that they he declared acknowledged natural children of Américo Ándrini but without limiting that acknowledgment “to the sole purpose of hearing the surname of their parents.”
The lower court made an order dismissing the complaint and granting the plaintiffs ten days to amend it. After a reconsideration of that decision was denied, the plaintiffs moved for final judgment, which was rendered, and thereupon the plaintiffs appealed.
As a first assignment it is urged that the lower court erred in construing Act No. 243 of May 12, 1945 (Laws of 1945, p. 814), in the sense that the same is merely of a prospective character.
Act No. 229, approved May 12, 1942 (Laws of 1942, p. 1296), provides: (1) that all children horn out of wedlock subsequent to the effective date of the Act shall he natural children, whether or not the parents could have married at the moment when such children were conceived; and (2) that children horn out of wedlock prior to the effective date of the Act “and who lack the qualifications of natural children according. to previous legislation,” may be acknowledged for all legal purposes by the voluntary action of their parents and, in default of the latter, by that of the heirs.1
Construing the provision set forth in § 1- of said Act, on May 9,1945, we held, in Correa v. Heirs of Pizá, 64 P.R.R. *122938, that said provision “on its face operates prospectively,” that is, that the only adulterous child who acquires at birth the status of a natural child is the one born subsequent to the effective daté of the new Act; that, according to § 2 of the same Act, an adulterous child born prior to May 12, 1942, may be acknowledged, for all legal purposes, by the “voluntary action” of the father or by that of the persons having the right to inherit from him; and that the conduct of a father, subsequent to 1942, in supporting an adulterous child and in admitting parenthood, does not constitute the “voluntary action” of the father as required by the statute for the recognition of an. adulterous child, since such a voluntary action must appear by a recordation, a will, or other public instrument executed by the father.
Three days after the rendition of our decision in Correa v. Heirs of Pizá, supra, the Legislature enacted, to take effect immediately, Act No. 243 of May 12, 1945, to amend § 2 of Act No. 229 of May 12, 1942, supra, by adding thereto a new paragraph reading thus:
“In case the children referred to in this Section are not recognized by the voluntary action of their parents, and in default of the latter, by that of the persons having the right to inherit therefrom, said children shall be considered as natural children for the sole purpose of bearing the surname of their parents., The action for this recognition shall be prosecuted in accordance with the procedure fixed by the Civil Code of Puerto Rico for the recognition of natural children; It being understood, however, That such a recognition shall only have the scope herein expressed.” (Italics ours.)
The lower court held that the foregoing provisions are also prospective, “inasmuch as the amendment merely refers to the case of the children who, if not voluntarily acknowledged by their parents, or in default of the latter, by the persons having the right to inherit therefrom, shall be considered as natural children for the sole purpose of bearing the surnames of their parents; and there is nothing in the law giving these provisions a retroactive effect.” It *123further held that the law governing the rights to the parties was the one in force at the time the plaintiffs were born; and that in order that the complaint may state a canse of action it must allege the capacity of the parents to marry both when such children were conceived and when they were born.
The construction given to the statute by the trial court is clearly erroneous. The children referred to in § 2 of the Act, as amended by Act of May 12, 1945, are the ones mentioned in the first paragraph of said amended § 2, that is, “the children born out of wedlock prior to the date this Act takes effect, and who lack the qualifications of natural children according to previous legislation.” Hence, in accordance with § 2, as amended, an adulterous child born prior to May 12, 1945, is entitled (1) to be acknowledged by the voluntary action of his parents or of the latter’s heirs; and (2) in default of such voluntary action, to be considered as a natural child “for the sole purpose of bearing the surname of his parents.” The provisions of § 2, as amended, can not at all refer or be applicable to an adulterous child born subsequent to the effective date of the Act of May 12, 1942, inasmuch as, in accordance with the provisions of § 1 of the same Act, from the moment of his birth he has the status of a natural child for all legal purposes, regardless of whether his parents could have contracted marriage at the time of his conception.
Did the lower court err in holding that the complaint was insufficient because it failed to allege that the defendant and Bernabela Cruz could-'have intermarried at the time the plaintiffs were 'conceived?
The dates on which the plaintiffs were born, as alleged in the complaint, are all prior to the effective date of the Act of May 12, 1942. The complaint alleges that the parents of the plaintiffs lived in concubinage from 1910 to 1934, the first child being born in 1912 and the seventh in 1926; that *124tile father lias always treated and considered them as his children; and that upon demand having been made on the father to acknowledge the plaintiffs as his natural children “for the parpóse of enabling them to bear, besides the surname of his mother, that of the father,” he has refused to comply with such comand.
The complaint, in our judgment, is sufficient. The plaintiffs, who were conceived while their parents lived in open concubinage, must have either of these two statuses: (a) that of natural children, with all the .rights granted to them by the Civil Code, if at the time they were conceived their parents were unmarried and could have intermarried or (b) that of adulterous children, with the rights acknowledged in their favor by Act No. 229 of May 12, 1942, as amended by Act No. 243 of May 12, 1945,.that is (1) the right to be considered as natural children, for all legal purposes, if born subsequent to May 12, 1942; or (2) in default of their acknowledgment by the voluntary action of the father or of his heirs, the right to be considered as'natural children “for the sole purpose of bearing the surname of their parents,” if they were born prior to the effective date of the Act of May 12, 1945.
In order to enforce the right to bear the surname of a father, it is not necessary to allege the unmarried status of the parents at the time of the conception of the children. The circumstance that in the prayer of the complaint the demand for acknowledgment is not limited to the use of the father’s surname can in no way affect the question of the sufficiency or insufficiency of the facts 'alleged in the complaint. The prayer forms no part of the complaint, and the court is not bound to render judgment in accordance with the prayer. Rule 54(c) of the Rules of Civil Procedure provides that “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 *125relief in his pleadings. ’ ’ The facts alleged in the complaint, if proved, are, in our judgment, sufficient to justify a decree of acknowledgment of the plaintiffs as natural children for the sole purpose of hearing the surname of the defendant. In the absence of any allegation or proof of the unmarried , status of the parents at the time the plaintiff children were conceived a decree of acknowledgment as natural children for all legal purposes would not he justified.
The lower court erred in dismissing the complaint. The judgment appealed from should he reversed and the case remanded for further proceedings not inconsistent with this opinion.
'Section 1. — All children born out of wedlock subsequent to the date this Act takes effect, shall be natural children, whether or not the parents could have married at the moment when such children were conceived. These children will be legitimized by the subsequent marriage of the parents, to each other.
"Section 2. — Children born out of wedlock prior to the date this Act takes effeet, and who lack the qualifications of natural children according to previous legislation, may be recognized for all legal purposes by 'the voluntary action of their parents, and in their default, by that of the persons having the right to inherit therefrom. These children will be legitimized by the subsequent marriage of the parents, to each other.”