delivered the opinion of the court.
*531This action was debt on the bond of the defendant in error as treasurer of Botetourt county. The defendant demurred to the declaration, which the court overruled; and he then filed his plea of “conditions performed,” upon which issue was joined, ilo other plea was filed, and upon the trial there was a verdict as follows: “We, the jury, find that the defendants is indebted to the plaintiff in the sum of fifteen hundred and seventy-two and 68-100 dollars, as of July 30th, 1883, and that the plaintiff is indebted to the defendants in the sum of twenty-seven hundred and forty-seven and 28-100 dollars, as of Jfily 30th, 1883, and we therefore find that the defendants recover of the plaintiff, the county of Botetourt, the sum of eleven hundred and seventy-four and 60-100 dollars, with interest thereon from July 30tli, 1883.”
The plaintiff moved the court to set aside this verdict and grant to it a new trial; but this motion the court overruled, and rendered judgment against the said plaintiff, the county of Botetourt, in accordance with the said finding of the jury, for the said sum of $1,174 60, with interest thereon from the 30th of July, 1883, until paid.
From this judgment the plaintiff applied for and obtained a writ of error to this court.
There were several exceptions taken on the trial of the ease, which are assigned as errors here.
First. That the action was debt on bond, with collateral condition, and the only plea filed was “conditions performed”; that under these pleadings the defendants could show that they were not indebted to the plaintiff, but they could not recover a verdict and judgment against the plaintiff for any indebtedness existing against it; that there was no plea of set-off nor account of set-off filed or claimed at the trial, and the plaintiff had no notice of the demand of the defendant against it until the finding of their said verdict by the said jury.
Section 3298 of the Code of Virginia provides as follows: “ In a suit for any debt the defendant may, at the trial, prove *532and have accorded against such debt any payment or set-off which is so described in his plea, or in an account filed therewith, so as to give the plaintiff notice of its nature, but not otherwise.”
Section 330-3 of the Code of Virginia provides that “a defendant who files a plea or account under this chapter shall be deemed to have brought an action at the time of filing such plea or account against the plaintiff,” and the same section concludes thus: “ But the defendant’s claim shall be open to the same ground oí defence to which it would have been open in any action brought by him thereon.”
It is clear that the circuit court erred in rendering judgment in this action against the county of Botetourt for the sum found by the jury in their said verdict. Such action of the said court was in plain violation of these plain provisions of the law, as set forth above. And it was error in the said court to overrule the motion of the plaintiff to set aside this verdict and grant a new trial.
This would have been true of any plaintiff similarly situated, but against the county of Botetourt it was erroneous for another reason, equally fatal to the claim of the defendant, if the plea of set-off had been filed with an account giving notice of the claim of set-off of the said defendant. * It is this : Section 834 of the Code of Virginia provides that “ thé board of supervisors of each county shall have power, at their meeting in July, or any other legal meeting,” “to examine, settle, •and allow all accounts chargeable against such county, and when so settled, issue warrants therefor.”
Section 838 of the Virginia Code provides: “ When a claim of any person against the county is disallowed in whole or in part by the board of supervisors, if such person he present, he may appeal from the decision of the board to the .county court of said county within thirty days of the date of said decision; if not present, he shall have notice served on him, and appeal within thirty days from the date of said decision: provided, that *533in no case shall the appeal be taken after the lapse of six months from the date of said decision.”
Section 843 of the Code provides that “ the determination of the hoard of supervisors of any county, disallowing any claim, in whole or in part, shall be final and conclusive, and a perpetual bar to any action in any court founded on such claim, unless an appeal be taken from the decision and determination of such board, &c.”
Section 844, following, provides that “ no action shall be maintained by any person against a county, upon any claim or demand, until such person shall have first presented his claim to the board of supervisors of such county for allowance.”
This is the mode prescribed by law, by which claims may be collected against the county, and the county cannot be sued in any other mode than that provided by law. The county is a political sub-division of the state, and can only be sued when and in the manner prescribed by law. The sovereign can be sued only by its own consent, and a state granting the right to its citizens to bring suit against it can be sued only in the mode prescribed. The same principles apply to a county, which is a part, of the state, which is, as we have said, a political subdivision of the state, suable only in the mode prescribed in the law granting the right to sue.
He who avails of the grant must follow its terms. Fry v. Co. of Albemarle, ante p. 195. If, therefore, the plea and account of set-off had been filed in due and regular course of pleading, there could have been no recovery thereon in this suit, for this claim, so presented, would have been deemed a suit against the county of Botetourt at the time of filing such plea or account, and under section 3303 of the Code of Virginia, cited above, would have been open to the same grounds of defence to which it would have been open in any action brought by him thereon.
Other defences are suggested by counsel—that the claim, if *534properly pleaded, would have been barred by the statute of limitations, &c.
But we do not deem it necessary to say more. The judgment of the circuit court of Botetourt aforesaid is plainly erroneous, and must be reversed and annulled.
Judgment reversed.