delivered the opinion of the court.
The main question in this case, (the determination of which dispenses with the necessity of deciding any other raised by *the record,) is, whether the money sued for was paid by the appellant to the appellees, or to. their use, undér such circumstances as to entitle the former to recover it back. And, upon a careful examination of the record, we are clearly of opinion that it was not.
No principle is better settled than that where a person, with full knowledge of the facts, voluntarily pays a demand unjustly made upon him, though attempted or threatened to be enforced by proceedings, as appears to have been the case in this instance, it will not be considered as paid by compulsion, and the party thus paying, is not entitled to recover, though he may have protested against .the unfounded claim at the time of payment made. As in Knibbs v. Hall, 1 Esp. 84, where a party under a threat' of distress, paid money as rent in order to avoid the distress, it was held that it could not be deemed a payment by compulsion, as the party 'paying might, by a replevin, have defended himself against the distress; and that, therefore, after a voluntary payment so made, he could' not be" allowed to dispute its legality. And so, in Brown v. McKinally, 1 Esp. 279, a party was sued on a claim which he knew to be unfounded, but, notwithstanding, paid it, declaring at the time that he did it without prejudice to his right to recover it *419back. In an action for the money thus paid, it was held to have been voluntarily paid, and, therefore, not recoverable.
There is no pretense here that the money sued for was paid under mistake of the facts, or under circumstances of fraud and extortion; nor is this a case where money has been paid as a necessary means to obtain the possession of goods wrongfully withheld from the party paying the money, as in Shaw v. Woodcock, 7 B. & Cr. 73. In such cases, an action may be maintained for the money wrongfully exacted. But it is the naked case of a party making payment of a demand rather than resort to litigation, and under the supposition that the claim, which subsequently turned out to be unauthorized by law, was enforceable against him or his *property. For the appellant himself tells us that he “ did not want to unite in any litigation about the legality of the law; but, as his property was advertised for sale, he thought he had better settle the bill; that he paid it because he did not want the city to sell his property, and lie did not want to enter into litigation.” And again, in the course of his evidence, he says: “ that at the time of said settlement, he presumed he was legally responsible for said bill of grading on North avenue, and that he paid said bill to avoid the trouble and expense of litigation, and that he took no part in the subsequent litigation. Tie thought it better to settle said bill.” He further says, that a certain contract made by him with the sub-contractors in regard to dirt furnished, and for which he was allowed compensation, “was one great inducement” to his settling the bill for grading. This is the state of case, as presented by the appellant’s own testimony, and which it would not be competent for him to controvert or gainsay.
As was said in Brisband v. Dacres, 5 Taunt. 144, and again in Elliott v. Swartwout, 10 Pet. 137, there are many doubtful questions of law. When they arise, the party, of whom claim is made, has an option either to litigate the question or submit to the demand and pay the money. But it would be most mischievous and unjust if he, who has acquiesced in the right by voluntary payment, should be at liberty, at any time within the statute of limitations, to rip up the matter and recover back the money. “ Every man,” as was declared by Lord Ellen-borough, C. J., in Bilbie v. Lumley, 2 East, 471, “ must be taken *420to be cognizant of the law, otherwise there is no saying to what extent the excuse of ignorance might not be carried. ' It would be urged in almost every casg. In Lowry v. Bourdie, 2 Doug. 454, money paid under a mere mistake of the law, was endeavored to be recovered back,' and there Buller, J., observed that ignorantia juris non excusat.” Instead of paying the bill1 for grading, the appellant should have pursued a similar course *to that pursued by Porter (Baltimore v. Porter, 18 Md. 284,) in regard to a claim for grading of the same street under the samé supposed authority,- and by testing the validity of the claim, defeated it. Failing to avail himself of a legal remedy for his protection, and electing to pay the demand made of him, rather than resort to litigation, he must abide his election, and be held as concluded by his conduct, with knowledge of all the facts. And if there was no other authority for the action of the court below, the cases of Baltimore v. Lefferman, 4 Gill, 425, and Morris v. Baltimore, 5 Gill, 244, would be regarded as in all respects conclusive of its correctness.
Judgment affirmed.