delivered the opinion of the court.
By virtue of a sworn application for a writ of certiorari filed in this Supreme Court on March 23, last, by attorneys *285Cuevillas & Mendez, in the name of the Successors of A. Mon-roig, against the Judge of the First Section of the District Court of San Juan, the judge of said court was directed to transmit the original record of the proceedings referred to in said application, prosecuted by Manuel Y. Otero against the Successors of A. Monroig for nuisance and damages, for the purpose of reviewing the proceedings, and from these records it appears:
1. That on May 6,190<3, Manuel V. Otero brought an action in the District Court of San Juan, first section, against the Successors of A. Monroig, for nuisance and damages.
2. That the defendants demurred to the complaint on the 20th of said month of May on the ground that it did not state facts sufficient to constitute a cause of action.
3. That this demurrer was sustained by order of September 30 of the same year, the plaintiff being granted 10 days within which to amend his complaints.
4. That the plaintiff on the following October 5 waived the period which had been granted to amend the complaint, and at the same time prayed for judgment in accordance with the said order, in order then to appeal therefrom.
5. That the court granted the petition, ordering the secretary to enter the decision of September 30, in the judgment book.
6. That an appeal having been taken from this judgment, the appeal was dismissed on February 23, last, on the ground that said decision could not be considered a final judgment, in view of the terms in which it was rendered.
7. That the decision of this Supreme Court was communicated to the lower court, and 15 days later — that is.to say, on March 10 — the plaintiff filed "a motion to be heard on the 16th of said month, by which motion he prayed the court to set aside his previous waiver of his right to amend the complaint, and that a new term be granted him to amend it, under which assumption he attached to the motion the amended complaint in order that the defendants might be required to make answer *286thereto within the period of 10 days from the date the court should so decide.
8. That the court made an order on the same date, March 16, admitting the amended complaint, and granting the defendants 10 days in which to file their answer.
The petitioner alleges the foregoing facts in support of his application for a writ of certiorari and the following conclusions of law:
1. That the order of the District Court of San Juan of March 16, last, is in contradiction with the decision of this Supreme Court of the previous 23d of February.
2. That the plaintiff: having waived his right to amend the complaint, such right became extinguished and could not be revived.
3. That the period to amend the complaint had already expired when the motion of March 10 was filed, and, consequently, cannot be reopened.
4. That the first complaint involved an action for nuisance and damages, while the amended complaint involves an action for trespass and damages, which actions are in their nature repugnant to each other.
On these grounds, of fact and of law, the petitioner prays that the order of March .16 last be set aside, as not conforming to the law and to the opinion of this Supreme Court of. February 23.
We find no contradiction whatsoever between the decision of this Supreme Court of February 23 dismissing the appeal taken from a decision rendered on September 30 of. last year by the District Court of San Juan, and the order of March 16 admitting the amended complaint. This Supreme Court held that the appeal should be dismissed because the decision appealed from was not a real judgment, and as neither of the parties took the proper steps to have a final judgment rendered containing the declarations necessary to that end, it is obvious that the proceeding had not terminated, but was awaiting final disposition when leave to amend the complaint *287was asked and the amended complaint was filed. Under the circumstances the plaintiff, in accordance with the provisions of section 139 of the Code of Civil Procedure could ask leave of the court as he did to amend the complaint and file such amended complaint.
The relevant portion of said section reads as follows:
“Any pleading may be amended once by the party of course, and without costs, at any time before answer or demurrer is filed, or after demurrer and before the feral of the issuv, of law thereon, by filing the sanm as amended, and serving a copy on the adverse party, who may have 10 days thereafter in which to answer or demur to the amended pleading.”
As will be observed the complaint could be amended at any time before rendition of judgment; and as it further occurred that the complaint was amended the plaintiff accepting the decision of the lower court sustaining the demurrer to the complaint, we are of the opinion that in this case the amended complaint could be admitted.
It matters not that the, amendment was made after the plaintiff had waived his right to do so, because by such waiver he intended, as he stated, to appeal to this Supreme ('ourt, and obtain a reversal of the order entered. The appeal was not sustained and the court was unable to discuss and decide it on its merits on account of the absence of a final judgment, and under these circumstances, when such judgment had not as yet been rendered, the plaintiff could well have submitted to the decision of the lower court, and, without the necessity of bringing a new action, file the amended complaint.
It is also to be noted that the amended complaint contains the same facts which served as a basis for the original complaint, that the prayer of the original complaint’ and that of the amended complaint are identical, and that there is no other difference between the amended complaint and the original complaint except that in the latter the plaintiff sought to obtain by an action for nuisance the same thing which he seeks *288to secure in the amended complaint by the action for trespass. These circumstances support the action of the lower court, which conformed to the provisions of section 140 of the Code of Civil Procedure, the relevant portion of which reads as follows:
“Tlie court may, in furtherance of justice, and on such terms as may he proper, allow a party to amend any pleading or proceeding by adding or striking out the name of any party, or by correcting' a mistake in the name of a party, or a mistake in any other respect, and may upon like terms, enlarge the time for answer or demurrer. The court may likewise, in its discretion, after notice to the adverse party, allow upon such terms as may be just, an amendment to any pleading or proceeding in any other particulars; and may, upon like terms, allow an answer to be made after the time limited by this Code. ’ ’
Judicial discretion may be exercised within a rather broad field of action, favoring thereby the high ends of justice; and .we would act with very narrow judgment and would depart from those ends, if we were to require, owing to the commission of an error in the name of the action brought when the facts conform to the prayer of the complaint, that a new action should be brought. The highly liberal principle which inspired sections 139 and 140 of the Code of Civil Procedure ■ is in open opposition to the doctrine sustained by the petitioner.
In the proceedings at issue the cause of action is identical, both in the original as in the amended complaint, and it could even be a matter of discussion if on the assumption that an error had been committed in the denomination of the action, the original complaint could be sustained.
As we do not find in the proceedings had in the District Court of San Juan, Pirst Section, anything which would warrant us to set them aside, the record should be returned to said « court in order that it may continue the proceedings as' if the writ of certiorari had not issued, with the costs against the petitioner.
Application denied.
*289Justices MacLeary and Wolf concurred. Justices Figueras and del Toro did not take part in the decision of this case.