By the Court,
Nelson, J.It is conceded by the counsel on both sides that the agreement between the parties comes within the act against buying and selling offices, 1 R. L. 109; the first section of which provides, that if any person bargain or sell any office or deputation of any office, or receive, have or take any money, or fee or profit, directly or indirectly, or take any promise or covenant, &c. to receive any money, fee, &c. for any office, or deputation of any office, or to the intent that any person should have, or enjoy the office, or deputation of any office, every such person who shall bargain, &c. shall not only lose and forfeit such office, and the right to appoint deputies; but every person who shall give or pay any sum of money or fee, or make any promise, agreement, &c. for any such office, or deputation, shall immediately on paying such money or fee, or on making such promise or agreement to pay, be adjudged a disabled person, in law, to all intents and purposes, to have, exercise or enjoy such office or deputation j and every such bargain, sale, promise, agreement, &c. shall be void. The second section confirms all acts of such officers or *178deputies while discharging the duties of the office, until displaced.
There can be no doubt the agreement in this case comes within the spirit, if not the letter of the first section above recited, as it secures to the inspector the excess of the fees or perquisites fixed by law as a compensation to the deputy, over and above the $500 agreed to be received. It was notorious that the statute compensation vastly exceeded the sum stipulated by the parties, and the agreement no doubt was made upon that basis; but if by possibility the former might exceed the latter, the agreement is corrupt, as affording a chance to the inspector of receiving, in the language of the statute, money, fee, reward, or profit, for making the deputation, or for exacting an agreement by which he might receive such money or profit. The act that denounces as void the agreement which secures to the inspector a reward for making the appointment of a deputy, .of itself includes a denunciation of an agreement which secures by possibility such reward. The principle is the same, and the difference only in degree, and such has been the decisions under this act in the English courts. 5 Bac. Abr. tit. Officers, 196, and the cases there cited. It is equally clear to me, that the appointment of the plaintiff to the office of deputy is so connected and interwoven with this corrupt agreement that it is impossible for the court, upon any sound construction, to separate them. The one was the consequence of the other, and so understood and intended by both parties; and to permit the plaintiff to recover the statute compensation, would be only disaffirming a part of the illegal agreement, and confirming the residue. It would be confirming the defendant’s part of it, to wit, the appointment, and disaffirming the plaintiff’s, to wit, that part which secured the reward for the office. I do not say that one part was the consideration for the other, technically speaking, but the whole was one entire arrangement, and if one part is void the whole must be. The parties are therefore in pari delicto, and the law will help neither.
I have examined attentively the cases in 1 Bos. & Pul. 3 and 296, so much relied upon by the counsel for the plaintiff, but cannot think them applicable to the case. In the first *179case, the defendant, a broker, effected an insurance for the plaintiff on a ship, which was void under an act of parliament ; the ship was lost, and the underwriters paid the insurance money over to the. defendant, for the plaintiff The defendant refused to pay it to the plaintiff, setting up the illegality of the insurance ; an action for money had and received was brought, and the plaintiff recovered. The true ground of this recovery, I consider, as given by Heath, J. in Farmer v. Russell, 1 Bos. & Pul. 296, that whether the consideration be good or bad, a man may recover his own money.” In both the cases in Bos. & Pul. one of the parties to the illegal contract had paid over the money for the plaintiff to his agent, which was the same in judgment of law as if it had been paid directly to him; the illegal contract was out of the question, and the rule pari delicto did not apply, though Hooke, J. in Farmer v. Russell, who dissented, gives some strong reasons against the recovery on the ground of the defect of the plaintiff’s title to the money.
In this case, there is no pretence for saying that an action for money had and received would lie for these fees, or that the defendant has received any money belonging to the plaintiff, in that sense of the term. The whole fees of the office belong to the inspector by the terms of the act, 2 R. L. 322, § 6, one part of them as much as another, and he is indebted to the deputy for his compensation; the per cent. is given in the statute merely as a rule to ascertain the amount of it. The plaintiff could only recover for work, labor and services rendered as deputy, not for money had and received. It is true, in this case, the amount of compensation given by the statute which the plaintiff is seeking to recover, is independent of the illegal agreement, because it required none to fix it; but the title to it, which will be more fully examined under another head, can only be supported by that agreement. As before remarked, the one cannot be separated from the other. Not so in the cases above referred to ; there the title to the money could not be questioned or litigated ; it was conceded by paying over the money for the benefit of the plaintiff, and upon that ground the cases were decided. This is admitted by Chief Justice Eyre, 1 Bos. & Pul. 301, when he says,“ if *180it be possible to mix the original transaction with the contract on which the action is brought, I agree with my brother Booke in all his conclusions.”
But besides the ground upon which the decision of the court below was placed, and which I have already examined, there is another I deem entirely decisive of this case, which is, that the whole shews the plaintiff has no right or title to these fees, or any other compensation for his services as deputy inspector, because, as regards every other consideration except the rights of the public or third persons, he was not a deputy inspector after the corrupt agreement. The inspector was incapable of making the appointment, and the plaintiff of receiving it, by the strongest terms that could be used in the act. The former, it is declared, shall “forfeithis office, and, the gift or nomination of such deputation,” and the latter “ shall he adjudged a disabled person in law,” to all intents and purposes. The 2d section was intended only to confirm their official acts, so far as the public or third persons were concerned, but not to secure to the parties the perquisites or profits of an office which they were exercising under an arrangement so effectually denounced. Neither party has any merits or claim to compensation, and the whole policy of the act forbids it. Whether an officer defacto, who is in the exercise of his office in good faith, believing his appointment valid, can recover the legal compensation for his services, it is not necessary now to decide. I doubt whether he can. Our act against the sale of offices is taken substantial-from the 5th and 6th Ed. 6, which may be seen at large in 5 Bac. Abr. p. 193, tit. Offices and Officers. I have seen no cases upon this point decided under that act; but the 25 Char. 2, commonly called the test act, is so far analogous, that I consider the decisions under it as entirely applicable to the act under consideration. By that act, all officers, civil and military, with exceptions mentioned, and all who have any fee, &c. shall take the oaths of allegiance and supremacy and test the next term, and receive the sacrament within three months, &c., and in case of neglect, shall disabled to hold the said offices. It has been decided under this act, that the persons disabled to hold the offices by not complying with its provisions within the specified time, lose *181then* right to the profits thereof, from the time such disability begins, which is at the expiration of the time to qualify mentioned in the act; and as to the validity of their acts, the only doubt which seems ever to have existed was, whether the official acts of such officers were valid for any purpose under the strong language of the statute. It is, ho wever, decided that their acts, while under such disability, may be valid as to the public or third persons. Bacon’s Abr. tit. Offices and Officers, 190. 1 Hawk. 16,17. See also 5 Wend. 231. The decisions under this English act must of course have related to the fees and official acts of the officers before conviction and judgment of forfeiture ; for after that, there could have been no question as to either. As before stated, it is most manifest that the 2d section confirming the acts of the officers while thus disabled, was for the convenience and protection of the public, and should not be so construed as to protect parties who have so grossly violated the law. It would be absurd, and a reflection upon the legislature, to believe that after having so carefully guarded appointments to office, and so justly denounced corruption by the penalty of forfeiture, they should specially provide for the protection of the transgressor, and the security to him of the emoluments of the office, till his iniquity was discovered.
On either ground above stated, I am of opinion the plaintiff cannot recover.
Judgment of the court below affirmed with single costs.