delivered the opinion of the court.
Bartolomé Colón brought two suits in the District Court of Ponce, one against The Royal Insurance Co., Ltd., of Liverpool, England, to recover $5,386.19, and another against The Western Assurance (jo., of Toronto,. Canada,, to recover *318$5,386.19, on fire insurance policies issued by the defendant in favor of the plaintiff in each case. Botli claims arose by reason of a fire which, occurred in Aibonito on January 6, 1928, and which, according to the plaintiff, destroyed property belonging to him to the value of $10,772.39.
Each of the defendant companies appeared-and, besides filing motions to strike out and demurrers, moved for a change of venue to the District Court of San Juan. The District Court of Ponce granted the change of venue sought, and thereupon the plaintiff took the present appeals, which we will consider in a single opinion herein.
The decisions appealed from are substantially the same. Literally copied, one of them reads as follows:
‘1 The Court, on motion for a change of venue to the District Court of San Juan, P. R., 'and in view of sections 77 (3), 81, 82 and 83 of the Code of Civil Procedure and the constant jurisprudence of the Supreme Court in all cases wherein, as in the case at bar, the defendant, at the time he appears or demurs, files a motion supported by an affidavit of merits for a change of venue, hereby orders that the civil action herein be transferred for trial to the District Court of San Juan.”
The assignment of errors in both appeals is as follows:
“First error. — The District Court of Ponce erred in its interpretation of subdivision 3 of section 77, and of sections 81, 82 and 83 of the Code of Civil Procedure, and in deciding the motion as if a personal action against a resident person or domestic corporation were involved, without taking into account that the present cases concern two non-resident, foreign corporations; that under the Code of Civil Procedure they may be sued in any district; and that the residence or domicile of their agents does not determine the jurisdiction of the court.
“Second Error. — -The District Court of Ponce erred in failing to apply or ignoring the provisions of section 79 of the Code of Civil Procedure of Porto Rico, first subdivision, as amended by Act No. 34 of April 21, 1928, cited by counsel for the defendants in their motions for a change of venue as well as by us in our opposition. thereto, which in cases like the present gives jurisdiction to the court of the district where the accident occurred.' Hence, as the 'accident *319took place in tlie municipality of Aibonito, tbe court which has ¡jurisdiction of these suits is the District Court of Quayama, provided the defendant moved for a change of venue.’’
Under the jurisprudence applied by this court prior to our decision in Arcelay v. American Railroad Co., 38 P.R.R. 723, we would have been bound to decide herein that the first of the two errors assigned had been committed, because the present case deals with two foreign corporations authorized to do business in the Island, and we had held that — •
“A foreign corporation has no residence in Porto Rico and the mere fact that its principal office is in San Juan does not entitle it to 'a change of venue by reason of its residence in a case ... in which the said corporation is one of the defendants.” Del Rio v. Heirs of Cancel, 33 P.R.R. 8, and cases therein cited.
But in the said Arcelay case, supra, the jurisprudence was reviewed and this court, following the decision of the Supreme Court of the United States in Power Co. v. Saunders, 274 U. S. 490, a constitutional question being involved, held that—
“When a foreign corporation doing business in Porto Rico is sued in a judicial district other than the one where it has its head office it is entitled to a transfer of the action to the district in which its principal office is located.” Arcelay v. American Railroad Co., 38 P.R.R. 723.
As it appears from the motions for a change of venue and the affidavits of merits attached thereto that the general agent of the defendant corporations has his head office and residence in San Juan and that, based on this circumstance and on the fact that personal actions are involved, a change of venue was applied for and obtained, it must be concluded that the first of the errors assigned is inexistent.
The real novel question involved in this appeal is raised by the second assignment of error.
Section 79 of the Code of Civil Procedure was amended by Act No. 34 of April 21, 1928,- as follows:
*320“Section 79. — Actions for the following causes must be tried in the district where the cause, or some part thereof, arose, subject to the like power of the court to change the place of trial:
“1. To obtain indemnity from an insurance company when such indemnity arises from an insurance policy contract, or to recover damages under section 1803 of the Civil Code, or for the 'reeov'ery of a penalty or forfeiture; except that when it is imposed for an offense committed on a body of water bordering on two or more districts, the action may be brought in any district bordering such body of water, and opposite to the place where the offense was committed. ”
Under the system adopted hy our Code of Civil- Procedure the venue of particular actions is fixed in certain districts, subject to the power of the court to change the place of trial, and there are special cases, such' as foreclosure proceedings under the Mortgage Law and its Regulations, where a change of venue is not allowed.
Accordingly section 75 of the Code of Civil Procedure provides that actions for the recovery of real property, or of an estate or interest therein, or for the determination in any form of such right or interest, and for injuries to real property; for the partition of real property; and for the foreclosure of a mortgage, must be tried in the district in which the subject of the action, or some part thereof,, is located. Section 79, before it was amended, originally provided that actions for the following causes must he tried in the district where the cause, or some part thereof, arose, subject to the power of the court to change the place of trial: (1) For the recovery of a penalty or forfeiture, except where imposed for an offense committed on a body of water bordering on two or more districts, in which case the action may be' brought in any district bordering on such body of water, and opposite to the place where the offense was committed; and (2) against a public officer, or person specially appointed to execute his duties, for any act done by him by virtue of his office, or against a person- who, by his command or his aid, does anything touching the duties1 of‘ such officer.
*321It is in “all other cases,” under section 81 of the same code, that the residence of the defendants or of any of them at the commencement of the action controls in determining the place of trial.
The effect of the amendment of 1928 was to include two more classes of cases within the number of those to be tried in the district in which the cause of action, or some part thereof, arose, namely, actions brought ag'ainst insurance companies to recover on an insurance policy, and actions for the recovery of damages under section 1803 of the Civil Code.
Such being the case, and as the present actions were instituted when the amendment was already in force, the proper district under the law for the trial of the actions was the District of Guayama, because the latter includes the municipal district of Aibonito, where the fire occurred which gave rise to the suits prosecuted against the defendant companies and based on insurance policies.
This is acknowledged by the appellees themselves who, however, contend that the plaintiff failed to make a timely demand of his right and should be now precluded therefrom; and, further, that, should this court decide that the change of venue ought not to have been ordered, the cases should be remanded to the District Court of Ponce with instructions to render judgments dismissing the complaints for lack of jurisdiction of that court over the subject matter of the actions.
We think that the Code of Civil Procedure itself contains applicable provisions which settle the question raised. Not only did the Code establish the rules we have already mentioned, but it also provides, generally, in section 76 thereof, that “in accordance with its jurisdiction, a court shall have cognizance of the suits to which the maintenance of all kinds of actions may give rise, when the parties may have agreed to submit the suit to the decision of such court.”
According to section 77, such submission may be express or implied. The plaintiff is understood to impliedly submit *322from the mere act of applying to the court and filing the complaint; and the defendant when, after his appearance in court, he takes any step other than to request that the trial he held in the proper court.
There is no doubt that the District Court of Ponce has jurisdiction to try suits of the character involved herein. Nor can it be doubted that the plaintiff submitted to its jurisdiction by filing his complaints in that court. Did the defendants also submit?
In our opinion they did, because although they moved for a change of venue in each case it was not to the proper court, as required by law. The proper court was the District Court of Gruayama and not the District Court of San Juan, and therefore the motions for a change of venue may be regarded as nonexistent, while the appearances, made for the purpose of filing motions to strike out and interposing demurrers to the complaints, subsisted.
As a more specific expression of the legislator’s mind in-this connection, it is provided in section 82 of the code:
“Section 82. — If the district in which the action is commenced is not the proper district for the trial thereof, the action may, nevertheless, be tried therein, unless the defendant, at the time he appears and answers or demurs, files an affidavit of merits, and demands, in writing, that the trial be had in the proper district. ’ ’
The conclusion we have reached above is not opposed to, nor does it detract in any manner from, the fundamental principle which inspired the decision of the Supreme Court of the United States in Power Co. v. Saunders, supra, and which was adopted and applied by us in Arcelay v. American Railroad Co., supra. There is now no discrimination between domestic and foreign corporations. The statutory precept which fixes the place of trial is equally applicable to all. To hold otherwise would be to go to the other extreme, that is, to establish a privilege in favor of foreign corporations.
*323Nor do we find any merit in the contention of the appel-lees that only a question of exclusive jurisdiction is involved in this case. The rule provided for is flexible. Not only is it subject to the power of the court to change the place of trial, but also to the will of the interested parties themselves. The consent of a party does not invest a court with any jurisdiction not conferred on it by law, but where the court has jurisdiction of the subject-matter, submission will supply the power that may be lacking under other statutory provisions, whose purpose is to better regulate and conduct judicial proceedings and which are mandatory when properly invoked, but which may be suspended if they are waived expressly or impliedly, as the provisions themselves authorize.
We might cite many cases decided by this court in support of the foregoing conclusions, but we will direct attention only to two of them.
In Antonetti et al. v. Foote et at., 16 P.R.R. 562, this court, through Chief Justice Hernández, held that—
“District courts as courts of general jurisdiction are competent to take cognizance of expropriation proceedings, even where the property which it is sought to expropriate is situated in a different district from the one in which the proceedings are brought, and even where the defendants reside in another district.
“The mere voluntary appearance of defendants in a district court of a different district from the one in which they reside, without seeking the transfer of the suit, constitutes a submission to the jurisdiction of such court, and they cannot successfully demur to the jurisdiction thereof. ’ ’
And in Hernaiz, Targa & Co. v. Vivas, 20 P.R.R. 99, it was field (to quote from tfie syllabus), tfiat—
“Filing an action' in the wrong district is not a jurisdictional defect when the court has general jurisdiction over the subject-matter, and the statutes prescribing the place of trial merely confer a personal privilege which may be waived.”
By virtue of tfie foregoing, tfie orders appealed from must be reversed and both, cases remanded to tfie District Court of Ponce for further proceedings in accordance with, tfie law.