Harrison, J.
The plaintiff and the defendant entered into an agreement June 7, 1893, by which the plaintiff was to construct an ironstone pipe sewer in front of the property of the defendant on Leavenworth street, between Greenwich and Lombard streets, in San Francisco, to the satisfaction of the superintendent of streets and highways of said city and county. There was at this time an ordinance in force in the city and *310county, making it a misdemeanor, punishable with fine or imprisonment, for any person to break up or disturb any public street without the permission of the superintendent of streets and highways, and providing that that officer should not issue a permit for the doing of any street work under a private contract, unless said contract provided for doing the work on the entire length of the block, and was signed by the owners of three-fourths of the frontage of the property in said block. The defendant was the owner of one-fourth of the frontage on Leavenworth street between Greenwich and Lombard, and prior to this date, viz., April 11,1893, one Daniel O’Connor had entered into a contract with the owners of the other three-fourths of the frontage on said street for building a sewer therein, and had obtained a permit from the superintendent of streets for constructing said sewer, which he afterward completed, and on the 10th of August received from the superindendent of streets á certificate of his acceptance of said work. The plaintiff never received a permit from the superintendent of streets to do any work on this portion of Leavenworth street, and did not do any of the work in constructing the sewer. The plaintiff brought the present action to foreclose a lien upon the land of the defendant by virtue of its agreement with him for the construction of the sewer. Judgment was rendered in his favor, and the defendant has appealed.
As the construction of the sewer in front of the defendant’s lot, without obtaining a permit therefor from the superintendent of streets, would have been in violation of the city ordinance, and have constituted a misdemeanor, any agreement between the plaintiff and defendant to construct it without obtaining such permit would have been unlawful, and could not form the basis of a civil action. Parties to an agreement are, however, deemed to have intended a lawful, rather than an unlawful, act, and their agreement is to be construed, if possible, as intending something for which they had the power to contract. As the obtaining a permit from the *311superintendent of streets was essential to rendering the agreement between the plaintiff and defendant valid, and as the instrument in question is silent upon that subject, the obtaining of such permit must be implied as a condition of the agreement between them, and the instrument signed by them as merely an inchoate agreement which would become effective and binding only in case such permit should be issued. This construction is corroborated by the terms employed by the parties to the instrument. It purports to be made between the plaintiff, as party of the first part, “ and certain owners of property, lots, and lands fronting on Leavenworth street, whose names are hereunto subscribed, each contracting severally, parties of the second part”; and in the body of the agreement the plaintiff agrees to and with the said “parties” of the second part, and they, “ each for himself and not one for the other,” agree to pay “for the work done in front of his or her own property respectively, and not in front of others, according to the ratio that his frontage bears to the whole frontage here represented.” In view of the requirement of the ordinance that the owners of three-fourths of the frontage on the block should sign the contract before a permit could be granted, it is evident that in signing the instrument there was implied a condition that, before the defendant was to be bound thereby, the plaintiff was to procure other parties thereto sufficient to entitle him to obtain the permit. If the plaintiff had refused to obtain such permit, and the defendant had attempted to enforce the agreement in the form in which it is found, or to recover damages from the plaintiff for its breach, it would have been a sufficient answer for the plaintiff to say that the ordinance forbade him from doing the work.
The plaintiff, moreover, failed to show that he had performed the contract on his part. He testified that he “ had not himself performed any of said work, but all of said work had been performed by one Daniel O'Connor,” and O’Connor also testified to the same *312effect. The plaintiff offered in evidence “ a written instrument, signed by him,” by which he purported to appoint Daniel O’Connor “ my true and lawful attorney, for me and in my name, place, and stead, to do and perform the work of constructing an ironstone pipe sewer in front of the property of the owners of lots and lands on Leavenworth street, under a certain written contract, heretofore entered into between the owners of lots and lands fronting on said Leavenworth street, between Greenwich and Lombard streets, and myself.” The record does not show that this instrument was ever delivered to O’Connor, or that he accepted the appointment, or acted under its terms, or did any work for the plaintiff. But, irrespective of this, the plaintiff acquired no rights against the defendant by reason of this power of attorney, or any act of O’Connor in the performance of the work. At the time this instrument was signed, O’Connor had already entered into a contract for constructing the sewer throughout the entire block, and whatever work was performed by him in the construction of the sewer was done under the obligation assumed by him in this contract, and not by virtue of any authority derived from the plaintiff. The finding “ that said O’Connor, under authority from plaintiff, performed for plaintiff the work described in plaintiff’s said contract” is without any evidence to support it. The finding that the plaintiff and O’Connor “ had a contract with all the owners of the five hundred and fifty feet frontage of the lots and lands fronting the proposed work, except the frontage of defendant’s property, for similar work to that mentioned in the contract between plaintiff and defendant,” is also unsupported by the evidence. There is no evidence that the plaintiff was a party to any contract with the owner of any frontage on the work, excepting the frontage of the defendant, and, as the contract with the defendant gave him no authority to do the work of building the sewer, he could not, by virtue of that contract, confer any authority upon O’Connor to build the sewer. The defendant’s liability *313to the plaintiff does not depend upon the construction of the sewer, but upon its construction by the plaintiff, and it was not sufficient for the plaintiff to show that the sewer had been constructed. He was also required to show that it had been constructed by him.
The judgment and order are reversed.
Garoutte, J., and Van Fleet, J., concurred.