delivered the opinion of the Court.
*248This is a case in which the facts are proved with almost mathematical precision. There is no controversy as to the same. Furthermore, it is a case in which the Superior Court did justice and in so doing it exercised in an exemplary manner its sound judicial discretion and construed and applied Rules Nos. 1, 70 and 71 of the Rules of Civil Procedure giving them life and permitting them to operate with the full force of their letter and spirit.1
For a period of more than ten years plaintiff Vicencio Cruz had been buying lottery ticket No. 299 from Mrs. Lester, widow of Diez, who is an authorized agent of the Puerto Rico Lottery. Formerly the tickets were divided into sixty fractions and plaintiff used to buy the whole ticket. When the number of fractions of the tickets was increased to eighty, plaintiff continued to buy regularly sixty fractions of the ticket of said number. Mrs. Diez sold the rest of the ticket to other persons. This arrangement was official, since plaintiff had registered said ticket in the Bureau of the Lottery through agent Diez to make sure that he could obtain it in all the drawings.
For the drawing of October 4, 1965, as usual, plaintiff bought the sixty fractions of ticket No. 299 from Mrs. Diez and paid with check No. 228 of September 14,1965. Mrs. Diez sold the remaining twenty pieces to 6 other persons whose names we need not mention here, but which are stated in the opinion of the Superior Court. The number of fractions that each and every one of those persons bought is also stated therein.
*249The sixty pieces or fractions of ticket No. 299 corresponding to said drawing of October 4,1965, which plaintiff bought, were stolen from him on September 23 of that same year from his business situated on 112 Condado Avenue in San-turce, Puerto Rico, which fact plaintiff immediately notified to the police, and in writing to the Bureau of the Lottery. Said bureau acknowledged receipt of his communication by letter of September 28, 1965. In said drawing of October 4, 1965, the ticket won a prize of $2,000. By letter of October 5, 1965 the Chief of the Payment Division of the Bureau of the Lottery, Carlos Fonseca, informed plaintiff that “in order to recover this prize he would have to file a petition in a competent court and also establish satisfactorily his right thereto.” The Secretary of the Treasury sent an order by telegram to stop payment of said ticket or fractions thereof, undoubtedly as a result of the theft informed by plaintiff to the Bureau of the Lottery.
Plaintiff filed in the Superior Court a petition for injunction against the Secretary of the Treasury and the Director of the Lottery, requesting that writ of injunction be issued ordering the Chief of the Bureau of the Lottery to refrain from paying the prize corresponding to ticket No. 299 and petitioner alleged that he resorted to the injunction proceeding for lack of any other adequate remedy at law.
Defendants answered the petition denying the essential facts and set up two special defenses. The first one consists in that the writ of injunction does not lie to preclude a public official from complying with an action authorized and ordered by a statute, and the second one consists in that pursuant to § 10 of the Lottery Act petitioner lacks a cause of action because the prizes corresponding to the tickets that are “lost or destroyed, or which are not collected” shall, be for the benefit of the Government.
The Superior Court decided that the writ of injunction did not lie, but based on Rule 70 of the Rules of Civil Pro*250cedure it considered the petition as a civil action for the purpose of doing justice between the parties and granted the same. Consequently, and it having been established beyond a reasonable doubt that petitioner is the legitimate owner of the sixty fractions of the winning ticket, the court ordered the Director of the Lottery and the Secretary of the Treasury to deposit in court the amount of the prize corresponding to the sixty pieces owned by plaintiff for delivery at the proper time.2 The Superior Court also ordered the Director of the Lottery that in case any person appeared to collect the prize for the winning fractions which belong to petitioner, said Director must notify the court the name and address of the persons who request payment to make them parties in the proceeding and grant them the opportunity to ,be heard prior to making payment of the prize. In the event that more than six months elapsed after the drawing of October 4, 1965 and no other persons appeared to collect the prize or to allege in court their right thereto, the court would order the payment of the amount deposited in favor of petitioner.3
Defendants-appellants filed a petition for review of the decision of the Superior Court and argue that the court could not grant the remedy requested because said remedy is aimed at restraining a function provided by law to the Director of the Lottery and, therefore, the writ of injunction cannot be granted.
It is true that injunction cannot be granted “to restrain the application or enforcement of any statute . . . or the performance by a public officer, a public corporation, or a public agency, or by any employee or officer of such *251corporation or agency of any act authorized by a law of the Legislature of Puerto Rico, unless it has been determined by final, firm, unappealable, and unreviewable judgment that such statute or act authorized by law is unconstitutional or invalid.” 32 L.P.R.A. § 3524(3). However, as it is undoubtedly clear that the legislative intent of that provision is not to permit and protect the theft of lottery prizes, the same does not render inoperative Rules Nos. 1, 70 and 71 of the Rules of Civil Procedure and the trial court did not err in considering the petition for injunction as a civil action and in providing an adequate remedy to prevent the damage, to which prevention plaintiff is entitled.
In the function of disposing of the cases as well as in deciding them on the merits, the courts, when it is necessary and equitable to do so, disregard errors in the names or titles of the actions and consider the same as it is proper. Thus, for example, in Núñez v. Benítez, Chancellor, 65 P.R.R. 812 (1946) a petition for mandamus was considered and decided as an action for a declaratory judgment; in Mena v. Llerandi, 70 P.R.R. 163 (1949) a petition for injunction to retain possession was considered and decided as an action of survey; in Rivera v. Chancellor of the University, 73 P.R.R. 361 (1952) a petition for mandamus was considered and decided as a declaratory judgment; in Heirs of Marrero v. Santiago, 74 P.R.R. 763 (1953) a petition for an action of revendication was considered and decided as an action for collection of money.
The cases of In Re Mieres Calimano, Pros. Atty. and Pagán, 76 P.R.R. 656 (1954) and Fuentes v. John Doe, 84 P.R.R. 486 (1962) cited by defendants have no bearing on the case at bar because their facts are different. In Mieres, supra, the owner of the fractions of the ticket lost them and they were found by Pagán, who, upon the ticket winning a prize, collected the same. In view thereof the original owner *252as well- as. Pagán, each one alleged to be the owner of the prize. Both appeared and the court ordered that the appearing parties should litigate between them their opposing claims as to the $15,000, which had been deposited by the prosecuting attorney in the Office of the Clerk of the court. We stated clearly therein, at page 660 that the Lottery Act did not purport to repeal nor has it actually repealed, expressly or impliedly, the provisions of the Civil Code dealing with the property rights and actually we affirmed the judgment of the Superior Court granting $15,000 to the legitimate owner of the tickets. In essence and in its equitable purpose our opinion in Mieres, swpra, is in accord with the decision of the trial court in the case at bar.
In Fuentes, supra, the facts are also different from those in the present case. There, as in Mieres, the ticket was lost and other persons bought fractions of the same from a person who offered them for sale. There we decided, at page 490, following the doctrine that, “the possession, even if it is acquired in good faith, of lost or stolen personal property . . . does not extinguish the right to property.” We also stated therein, at page 494, citing the commentators, that the fact that a lottery ticket is a security to the bearer, is not sufficient to wipe out the irregularities of a vicious acquisitive fashion. It may be seen also that in Fuentes, supra, we protected the legitimate owner of the ticket and did not permit that his right be defeated. Cf. Silva v. Industrial Commission, 91 P.R.R. 865 (1965).
' Invoking the aforementioned § 10 of the Lottery Act, 15 L.P.R.A. § 120, which provides that the prizes corresponding to the tickets that are lost or destroyed or which are not collected within the period fixed by the law shall be for the benefit of the Government, is not successful either in defeating the decision of the trial court and the justice imparted thereby. In this case the ticket in question is neither *253lost nor destroyed and its owner claimed the prize within the term fixed by the law. We wonder at this special defense raised by defendants in the Superior Court because, what interest can they have in preventing plaintiff, the established legitimate owner of the prize, from collecting it? As it is well stated by the court, it would not be fair (or correct, w;e add) to interpret said § 10 in the sense that the lawmaker intended that the true owner of the winning ticket lose the prize because a criminal hand has stolen the ticket even though afterwards the right of ownership of the true owner has been satisfactorily proved.
The judgment rendered in this case by the Superior Court, San Juan Part, on November 2, 1965 will be affirmed.
Rule No. 1. “These rules . . . shall be construed to secure the just, speedy, and inexpensive determination of every action.”
Rule No. 70. “Any error in the title of the action or in the prayer for relief shall not preclude the court from granting the appropriate remedy in accordance with the pleadings and the evidence.”
Rule No. 71. “Where no specific proceeding has been provided for in these rules, the court may regulate its practice in any manner not inconsistent therewith or with any applicable legal provision.”
There is no problem as to the payment of the portion of the prize corresponding to the remaining twenty pieces because the six persons who bought them are duly identified by their names and also the number of pieces or fractions that each one of these persons bought is known.
The right to collect lottery prizes expires at the end of six months after the corresponding drawing is made. (15 L.P.R.A. § 122.)