delivered the opinion of the court. The plaintiff cannot pretend to claim on the ground of contribution, for it is well settled that, as between trespassers, there can be no contribution. In such case, the law will not imply a promise. It is a general and well established principle, that, if the consideration be illegal, it will not uphold an assumpsit : as in the case put in the books: the defendant, in consideration of 20 shillings, assumed to pay 40 shillings if he did not beat J. S. out of such a close. The common law prohibits every thing unjust, or contra bonos mores, and a contract contravening these principles is void. But if one person request another to enter into Bis land, and, in his name, to drive out the beasts, and impound them, and promise to save him harmless, this is a good assumpsit, though the act is tortious. (Winch. 49. 1 Com. on Con. 31.) In Allaire v. Ouland, (2 Johns. Cas. 54.) where the plaintiff was the servant of the defendant, and had been commanded by him to enter into the locus in quo, claiming it, and declaring it to be his own, and promising to indemnify the plaintiff, the court say, if this had been true, the entry would have been lawful; the plaintiff, relying on the truth of the defendant’s declarations, did enter; the act, on his part was, therefore, lawful, and a good consideration for the promise. And where a promise was made to an innkeeper, that if he would keep one B., (whom the defendant pretended to have arrested on a commission of rebellion.) for one night, in his inn, as a prisoner, he would save the plaintiff harmless, judgment was given for the plaintiff, who had been sued for a false imprisonment, and a recovery had against him. The court say, that, whether B. was arrested lawfully or not, the illegality thereof did not appear to the plaintiff. (1 Win. Abr. 299. pi. 27.) But if the act directed to be done appears to be unlawful, then the agreement will be unlawful and void. (Buller, N. P. 146.)
1 have no hesitation in saying, that it is a true and just distinction between promises of indemnity which are, and those which are not, void; that if the act directed or agreed to be done, is known, at the time, to be a trespass, an express promise to indemnify would be illegal and void ; but if it was not known at the time to be a trespass, the promise of indemnity is a good and valid promise. ( Coup. 343.)
I am strongly inclined to the opinion, that the plaintiff has himself within the latter distinction. The question upon the argument of the case of The Farmer’s Turnpike v. Coventry, (10 Johns. Rep. 389.) turned upon the right to erect this gate where it was put; the defendant’s counsel contending, that the gate could not be set up within three miles, at least, of the compact parts of the city of Hudson, as defined by a map confirmed by the act of 1807. We decided against that construction : but there was, at least, color for the ground taken. Again, Hardick, who was a commissioner of highways, brought *123directed the defendant to set his men to work, and take the gate away, upon which the defendant ordered it to be done. Here, then, is the case of the commissioner and overseer of highways both agreeing in considering tire gate as a nuisance, and both directing it to he removed. The plaintiff was acting in a subordinate capacity. He perceived a gate standing directly across an old road, and his superiors, whom he had a right to think well informed, pronouncing it, in effect, to be a nuisance. I think the conclusion inevitable, that the plaintiff did not know, at the time, that the act he was doing was a trespass; and then the promise of indemnity is valid.
There must be a new trial, with costs to abide the event of the suit.
New trial granted.