Opinion by
Rice, P. J.,
In order to sustain the demurrer the defendant was bound to sustain the general proposition that a court of equity has no jurisdiction to restrain the disturbance of an alleged easement until the plaintiff’s right has been established in an action at law. We say this, not because counsel expressly argue that this is the general rale, but because it would be the logical conclusion from holding that this bill was demurrable. Upon the facts admitted by the demurrer, the right of the plaintiff to have *639the water flow as it had flowed for fifty years (so alleged in the bill) and as the defendant agreed that it should be permitted to flow in the future, was clear. If upon such a state of facts as is alleged in the bill the right of the plaintiff must be established in an action at law before he can invoke the aid of a court of equity, there is no state of facts to which the rule would not apply. But there is no such general rule. A demurrer to a bill in equity admits the material facts averred in the bill, and where such facts show a legal title in the complainant it is not a prerequisite to the enforcement in equity of equitable rights incident thereto that the complainant’s legal title be established in an action at law: Bitting’s Appeal, 105 Pa. 517. This is all that need be said in support of the action of the common pleas in overruling the demurrer.
Nor is the jurisdiction of the courts of equity to restrain or prevent the commission or continuance of acts contrary to law and prejudicial to the rights of individuals, as applied to a bill to restrain the obstruction of an easement, ousted by an answer denying the plaintiff’s legal right. The idea was thus expressed in Miller v. Lynch, 149 Pa. 460: It is not enough for the defendant to deny the plaintiff’s right; his denial must be based upon facts which show a substantial dispute.” If upon the proofs adduced at the trial it appears that no' fact essential to the establishment of the plaintiff’s legal right is wanting, or is in substantial dispute, an equity based on that right may be asserted and a decree for equitable relief made.
It appears in the present case that the plaintiff began an action at law in which the dispute as to his legal right would have been adjudicated, if the action had been prosecuted to trial and judgment. But the parties saw fit to settle the dispute, and thus end the litigation, by a written agreement, in which the plaintiff’s right to flow the surface water collected from the fall of rain and the melting of snow on his premises upon the adjoining land of the defendant, along the line fences between their respective properties, “ as the same was wont to flow for many years,” free and clear of obstructions erected or caused to be erected by the defendant, his heirs and assigns, was -unequivocally agreed to, if not distinctly recognized as a pre*640viously existing right. There is no dispute as to the execution of this instrument, or as to its terms, and no allegation that it has been rescinded or annulled. There is a dispute as to its construction, but there is none as to ány extrinsic fact affecting its construction, and therefore there is no occasion for remitting the plaintiff to an action at law to determine its construction, and there would be no propriety in doing so. The question then arises whether the vesting of the right to have the water flow as it had been wont to flow was dependent upon the prior performance by the plaintiff of what he covenanted to do. This question is to be determined by inferring, with as much certainty as the case permits, the meaning and purpose of the parties from a rational consideration of the whole instrument and the subject-matter of the agreement: 2 Parsons on Contracts, 529. The declared purpose of the instrument was to carry into effect the amicable adjustment the parties had made of the differences that had recently existed between them as to the plaintiff’s right to flow the surface water as it had been wont to flow for many years. Their evident intention was to settle that question finally and to avoid any dispute regarding it. Hence, when they agreed that the plaintiff “shall have the right,” without expressly making it conditional, the reasonable inference is that they intended it to vest at once. This inference is not weakened by the plaintiff’s covenant to fill up all gullies and ditches washed out by the waters caused by the falling of rain or the melting of snow on the plaintiff’s premises, then existing or that might thereafter be washed out, so as not to increase the flow of said waters on the defendant’s premises for any unreasonable length of time. The learned judge below well says: “The agreement did not contemplate that if Lewis Schuler should fill up all the gullies and ditches in his upper field that would remedy the flow for all time to come. His duty, under the premises, is a continuing one, and whilst it may be impossible to fill up the gullies in such a manner that they will not again be made by the washing of water, still it is not impossible to fill them up from time to time when they occur.” Properly interpreted this is a continuing covenant on the part of the plaintiff not to permit an increase of the flow of *641water for an unreasonable length of time by leaving gullies as they are caused from time to time unfilled, but the performance of this continuing obligation was plainly not intended as a condition precedent to an immediate vesting of the easement which he here asserts. We conclude that no fact essential to the establishment of the plaintiff’s legal right is lacking or is in substantial dispute under the proofs, and therefore that the court had jurisdiction to decree equitable relief, unless for equitable reasons the plaintiff was not in position to demand it.
But although the fact of the plaintiff’s easement was clearly established, the court was not bound to go to the full extent of decreeing specific performance of the defendant’s subsequent covenant to remedy certain conditions existing at the time of the agreement, if the plaintiff was in default in filling up the gullies then existing on his own land. In such a case, although in a court of law the covenants would be held to be independent, •yet a court of equity might well refuse to decree specific performance of the covenant last referred to: Datz v. Phillips, 137 Pa. 203. It is unnecessary, however, to go into an extended discussion of this question, because the learned judge has found that the plaintiff filled the gullies and ditches on his land, and at the date of suit brought was not in default in respect of that obligation. Having regard to the nature of his covenant, as heretofore explained, we are unable to agree with the appellant’s counsel that there was not sufficient evidence to sustain this finding. As to the effect to be given to such a finding of the trial court we refer to the cases cited in Davis v. S. W. Penna. Pipe Lines Co., 34 Pa. Superior Ct. 438 at page 442. We repeat in conclusion, what has been distinctly intimated heretofore, that the fact that the plaintiff is not presently in default will not relieve him from the continuing obligation to fill the gullies as they occur so as to prevent an increase of the flow of water for an unreasonable length of time.
The decree is-affirmed at the costs of the appellant.