delivered the opinion of the court.
Elenterio Felicie and others brought an action in the District Court of San Juan for recovery of money and the specific performance of contract against The Porto Rico Racing Corporation and José Juliá and others.
They alleged in substance that the defendant Porto Rico Racing Corporation is a corporation organized in accordance with the laws of Porto Rico for engaging in the operation of race tracks and has leased and operates the Quintana Racing Park; that on May 1, 1927, six out of the seven races announced in the official program were run and a pool was played in relation to them; that the plaintiffs made with the defendant corporation “a betting contract consisting in the combinations of horses of those which were to take part in the races to be run on that day, as had been announced in the official program of the said racing day which specified the distance to be run in each race”; that the third race was announced for 950 meters; that when making their tickets the plaintiffs chose their combination in accordance with the official program and believing that the horses in the third race had to run 950 meters; that their tickets being so pre*425pared, they were sealed and delivered to the hippodrome after paying the corresponding price; that the said third race was not run 950, hut 900, meters, a distance on which the plaintiffs did not bet, the horse Brockway being the winner and receiving the first prize from the jury and as such was declared valid for the adjudication of the pool; that the third race is void and only the other six races run according to the program are valid; that the pool amounted to $16,449, of which the plaintiffs are entitled to $793.05, as they represent three parts of the forty-two parts which at the rate of $264.35 they would receive of the total amount of the pool if the court should hold that for the purposes of the betting contract the defendant corporation ran only six races; that a canvass having been made in the pool-booth of the race track of the tickets containing the six winning horses of the only six valid races, among them were found those of the plaintiffs; that the plaintiffs have been and are willing to deliver to the defendant corporation the triplicate stubs corresponding to their tickets as soon as the corporation pays to each of them the sum of $264.35 to which they are entitled.
Several persons moved to intervene as defendants and others as plaintiffs and as such they were brought into the litigation.
The defendant corporation answered admitting several of the facts alleged in the complaint. The following are the allegations which seem to be most important:
“8. — The defendant alleges that it neither denies nor admits the facts stated in the 8th averment of the complaint, because the defendant is not in a position to know how the plaintiffs made the combination in their tickets, but it admits that the third race run on May 1, 1927, Was announced for 950 meters on the official program, and the defendant alleges ignorance for Want of sufficient information and because it is a question of law to be determined by the courts, as to Whether the third race run on May 1, 1927, is or is not void.
*426“9.- — The defendant admits allegation 9 of the complaint, but alleges that in the final holding of the races and the starting of the horses on its race track the defendant has no direct intervention, for that is controlled by the Insular Racing Commission, or was at the time of the race run on May 1, 1927, and admits that the said third race was run, according to the report submitted by the jury of the race track operated by the defendant, for a distance of 900 meters intead of 950 as had been announced in the official program.
“10. — The defendant neither admits nor denies the 10th averment of the complaint for lack of sufficient information, and alleges, moreover, that it has no direct or indirect intervention in the holding of the races, because from the time the jury takes possession of the race track at 3 p. m. of the day when the race is held, the defendant has no legal authority to intervene in the acts performed on said race track, which remains absolutely under the management of the jury and the Insular Racing Commission.”
The defendant alleged also that other persons, asserting that they had bet on the seven winning horses, had claimed the pool and it had decided to deposit, and did deposit, in the court the amount of the said pool. The defendant in-tervenors filed a demurrer on May 7, 1927, alleging that the complaint did not adduce facts sufficient to constitute a good cause of action and moreover that it was ambiguous, unintelligible and doubtful, and later, on the 18th of the same month, they filed their answer admitting certain facts and denying others. It seems well to transcribe the 8th and 14th aver-ments of the answer. They are as follows:
“8. — That they neither admit nor deny the facts alleged in the 8th averment of the complaint because the plaintiffs lack sufficient information as to how the plaintiffs made their tickets, but they admit that the third race run on May 1, 1927, was announced at 950 meters on the official program, and the defendants allege ignorance for lack of sufficient information and because it is a question of law to be determined by the courts, of whether the third race held on May 1, 1927, is or is not void.
“14. — The defendants admit that the horses Cian, Sherman, Reyes Magos, Cheque, Pastora Imperio and Cubilete were the winners respectively of the first, second, fourth, fifth, sixth and seventh *427races, but tbe defendants allege that Broclcway was the real as well as the legal winner in the third race. ’ ’
They also alleged new matter tending to show that the pool should he distributed among them because they had bet on the winners of the seven races and had no intervention in changing the official program in regard to one of the races.
At this stage, on May 24 the following stipulation was submitted to and approved by the court:
"The parties in the present ease appear by their undersigned attorneys before this Court and set forth and pray as follows:
"1. — That by the pleadings in the present case and there being no controversy as to the material facts of the complaint, it appears that the only question submitted to the court for its consideration and decision is a question of law.
"2. — That the said question of law is limited solely to the manner of construing and performing the betting contract called a pool.
"3. — That in view of the fact that the pleadings do not raise a question of fact whose existence needs to be proved before this Court, the only question to be determined by this Court is whether the pool corresponding to the races of May 1, 1927, in the Quintana Nace Park should be distributed by taking into consideration the six only races which Were run in accordance with the betting contract and the official program, as alleged by the plaintiffs, or Whether, on the contrary, it should be distributed by taking into consideration the seven races Which were run and count as valid the third race for the purpose of the pool, as contended by the inter - venors who have been joined as defendants.
"By virtue of the foregoing the parties pray this Court to render judgment on the merits of the pleadings, previously granting the time Which it may deem proper for presenting briefs in support of the contentions of both parties with respect to the only question of law submitted to this Court.”
On tbe 15th of the following June the district court rendered judgment in favor of the plaintiffs. The Porto Eico Eaeing Corporation, defendant, did not appeal. The defendant intervenors appealed to this court and in their brief contend that the court committed error in declaring the validity of only six of the races run and in holding that the *428defendant Porto Eico Eacing Corporation was obliged to pay the pool to the holders of the triplicate stubs of the tickets containing the six winning horse's.
In arguing the first assignment of error it is contended that the district court acted without jurisdiction because it is not alleged in the complaint that the plaintiffs presented ■ their claims to the jury and therefore the decision of the jury was final and can not be attacked, and also because it is not alleged that they appealed in any way from the said decision of the jury to the Insular Eacing Commission, and therefore no showing has been made that all administrative remedies had been exhausted before applying to the courts of justice.
We entirely agree with the appellants that the law and the regulations under which the contract involved herein was made to form a part thereof and that, such being the case, application should be made of sections 19, 20, 21 and 29 of the Eules and Eegulations of the Insular Eacing Commission, which in their pertinent parts read as follows:
"Section 19. — The jury is the arbiter of the races and shall enforce strictly and rigorously the provisions of these regulations, and shall have the power to impose penalties for any breach thereof. . .
"Section 20. — The jury is the sole judge of the races. Any claim arising therefrom shall be filed with said body, through its president, immediately after the occurrence of the act which was the origin of the claim.
"Section 21. — Before deciding- any claim the jury may request to be furnished with all the necessary information, and shall give an opportunity both to the claimant and to the person against whom the claim is filed to submit all the necessary data to bring out the facts.
"Section 29. — The decisions of the jury and the starter shall be appealable to the Insular Racing Commission except in regard to the starts and to the order of the arrivals of the horses in each race which shall be unappealable.”
In accordance with tbose regulations it is evident that the plaintiffs should have submitted the question to the jury and should have appealed from its final decision, if adverse, to *429the Commission. It is only after the intervention of the Commission that the plaintiffs would have been in a position to resort to the conrts of justice. This is clear and it is also clear that these facts are not alleged in the complaint.
Bnt the plaintiffs contend that that question was not raised by the appellants in the lower court and is not included in the stipulation and that therefore by raising it for the first time in this Supreme Court it is sought to change completely the theory of the case, which would be contrary to the several decisions of the continental courts and to the decisions of this Supreme Court in Porto Rico Benevolent Society v. Municipality of Ponce, 28 P.R.R. 773, and Calderón v. Reyes, 31 P.R.R. 260.
Not only did the appellants not raise it in the lower court, but they expressly alleged in their answer that the question raised as to the validity of the third race “was one of law to be decided by the conrts” and expressly stated in the stipulation that “the only question to be determined by this Court is whether the pool corresponding to the races of May 1, 1927, in the Quintana Racing Park should be distributed by taking into consideration the six only races which were run in accordance with the betting contract and the official program, as alleged by the plaintiffs, or whether, on the contrary, it should be distributed by taking into consideration the seven races which were run and count as valid the third race for the purpose of the pool, as contended by the intervenors who have been joined as defendants.”
That the theory of the case can not be changed on appeal has been held repeatedly by this court. But the appellants now allege that it is a jurisdictional question which may be raised at any stage of the proceeding. They would be right if it were really a fundamental question of jurisdiction going to the root of the authority of the court to take cognizance of the action. For example, if the case before the district court had been one of bankruptcy and no objection had been made. On appeal to the Supreme Court any party in interest *430might allege that the proceeding was void for want of jurisdiction. The court itself, motu proprio, would reach that conclusion.
But in this case the court had authority to take cognizance of the matter and the lack of jurisdiction is based only on the failure of the complaint to allege the fulfilment of certain prerequisites and the presumption is that the said fulfilment was admitted when no objection was made in the district court. If objection had been raised, the plaintiffs would have had an opportunity to amend their complaint.
In a similar case the Supreme Court of Iowa said:
“In the second of the two cases under consideration the trial court gave plaintiff a judgment against Polk county for taxes paid on the valuation in excess of $310. It is urged here by appellants that no claim was ever presented to the board of supervisors, and that this was a necessary prerequisite to the right to maintain an action against the county. Bibbins v. Clark, 90 Iowa, 230, 57 N. W. 884, and 59 N. W. 290, and cases therein cited, support this claim. Nevertheless we do not think such defense can be sustained in this case, foh the reason that the question is first presented in this court; and we may say the same of the objection urged that the assignment to plaintiff of the cause of action is not shown. Issues of this kind, if not raised in a timely and proper manner, will be deemed waived. Reed v. City of Muscatine, 104 Iowa 183, 73 N. W. 579, and cases cited.” Smith v. McQuiston, 79 N. W. 130, 132.
We quote what the district court said in its opinion:
“It is neither alleged in the complaint nor said in the answer why the third race was run at 900 meters, when it was announced in the official program at 950 meters; but from a certificate attached to the brief of the intervenors and issued by the Insular Racing Commission it is deduced that it was due to an involuntary error and that the Commission affirmed the decision of the jury, declaring the race valid as if it had been run at 950 meters, in the absence of fraud or any other abnormal circumstance.”
In Hernández et al. v. Hernández et al., 31 P.R.R 643, this Supreme Court said:
“Generally when the record shows that the parties joined issue on the facts and that the objecting party acted at the trial as if the *431questions bad been duly raised by tbe pleadings, tbe Supreme Court will not insist on tbe existence of averments either in tbe complaint or in tbe answer. Howfever, when there is no sign of consent by tbe opposite party or an estoppel against him, an appellant can not raise for the first time on appeal questions which should have been set up in the pleadings.”
In their argument on the second assignment the appellants contend that specific performance of the betting contract can not he demanded of the defendant Porto Rico Racing Corporation because the defendant corporation had nothing to do with the change of distance in the third race.
It is true that the corporation alleged that it had had no intervention either directly or indirectly in that change, for as soon as the jury of the race track takes charge at 3 p. m. of the day on which races are run, the defendant has no authority by mandate of the law to intervene in the acts to be performed on the said race-course which remains under the absolute management of the jury and the Insular Racing Commission. But it is true also that it is the defendant corporation which finally must pay the amounts corresponding to those who win in the game.
This being so, the question has not the importance attributed to it by the appellants.
We might stop here and affirm the judgment appealed from, for really the appellants do not attack the decision of the court on its merits, and indeed when the authority of the court to hear and decide the question is acknowledged no other conclusion can be reached than that the court decided the same in accordance with the facts and the law.
This is a betting contract which produces legal effects according to section 1703 of the Civil Code. The contract is defined in section 115 of the Regulations of the Insular Racing Commission as consisting in choosing the greatest number of winners and betting on them in the written tickets deposited officially with the race-track corporation.
*432The defendant, The Porto Rico Racing Corporation, by reason of that agreement became bound towards the persons who deposited their tickets in the official boxes and paid the proper price to have the third race rnn at 950 meters as had been officially announced. It was run at 900 meters. The contract was clearly altered. Does that alteration constitute really a failure to perform? Section 57 of the Regulations of the Insular Racing Commission prescribes that no alteration shall be made to the terms of registration for the races after they are announced, except in so far as it refers to the change of jockeys, and section 58 prescribes that the registration judge must take care to have the official program contain among other particulars the names of the horses and the distances, and if an involuntary error should result in the programs after their publication, the registration judge must correct it by advertising it publicly before 11 a. m. on the day of the races on the pool board, that is, before the commencement of the registration of the betting tickets and the consummation of the betting contract. This was not done in the present case.
It will be seen, therefore, that it is not a question of an unimportant requisite. It is expressly referred to in the Regulations. Distance is an important factor which is taken into account when horses are selected according to their respective resistance. The alteration invalidates the race.
That being so, the district court was entirely justified and the judgment appealed from must be affirmed.