Peck, J.
This is a suit of replevin, brought by the Federal government against the company, for merchandise, as property owned by the former, and to the immediate possession of which it was entitled. The defendant plead the general denial; also that it held possession under a carrier’s lien, when the merchandise was taken from it upon the writ of replevin. The facts were argued upon, submitting to the district court their legal effect, so that the issue was in form one of fact, in substance one of law. Its judgment was based upon this agreement: The parties stipulated that the case might be heard at chambers, and the judgment rendered as of the previous September term of 1878: and the judge who sat in the case below proceeded in form according to the stipulation. Whatever doubt might exist as to the power of parties to confer upon a district judge jurisdiction to try and decide an issue of fact in vacation, and render judgment of an expired term, is met by the fact that in this instance he was trying an issue of law — for which purpose, under the statute of December 15th, 1877, for facilitating the business of the district courts, the court was open and the September term unexpired, when the case was heard and decided; and the circumstance of rendering the decision as of a prior day during the term, is unimportant.
One Dwight J. McCann had a contract with the government, to whom the merchandise belonged, for the transportation of it from New York, or other point or points east of Omaha, to the White River Indian Agency in Colorado, where it was to be used in the Indian service; the defendant’s road from Omaha to Rawlins was a proper route of *185transportation for the purpose of getting the property to its destination; he contracted with the company to transport from Omaha to Rawlins accordingly; and under the contract delivered the property to the company at Omaha, and the latter duly carried it to Rawlins, and there stored it ready for delivery; and for the carrying and storage was legally entitled to he paid $588.16, no part of which sum had been paid or tendered to it, when the writ of replevin was executed. As against McCann, had the property been his, the company would have had the usual common carrier’s lion upon it for these charges. The government, claiming that its property was exempt from such a lien, refused to recognize the company’s demand, and replevied the goods, the value of which, as per the replevin appraisal, was $4,951. The transportation from Omaha to Rawlins, and the contract for it, were necessary, acts on the part of McCann in the performance of his contract with the government ; and nothing* appears to indicate that, when the writ was executed, and up to that time, he was not in the due discharge of the latter contract; and it must be taken, if that can affect the questions to be decided, that he was then and until then in the proper discharge of his duty to the government.
In considering the questions presented by the ■ record, we will first assume that government property is exempt from the common carriers’ lien. The government can retain or waive the exemption at will. Had it transported the merchandise through an agent, the property would have remained under its control, the possession of the agent would have been its possession, the contract of carriage would have been directly between it and the carrier; and thus the exemption would have attached, and been retained. 'It transported the merchandise through a contractor ; the contract measured the relations of the parties, and subjected them to reciprocal obligations, precisely as it would have done, had both been private individuals; imposing upon him the duty to transport, it incidentally con*186ferred upon Mm the right to adopt such methods, and to make such sub-contracts of carriage, as should be necessary to perform that duty — therefore to make such sub-contracts according to the established rules of carriage. The primary contract was an irrevocable authority from the government to him to that end, and to that extent — an authority upon which he, and all parties dealing with him within its scope, might rely. Receiving possession from the government, he received it upon the faith of his contract with it; contracting with the railway company, and re-delivering the property to it, the sub-contract was made, and by the company performed, upon the faith of the primary contract; all the incidents of common carriage, among them the usual lien for charges, attaching thus, the government waived its exemption, is subject to the lien, and is powerless to disturb the rights which have arisen between McCann and the company. Can anything be more incongruous than that the government should hold its contractor to his obligation, and have the right to frustrate the very methods which are indispensable to the performance of that obligation? Governments, as individuals, are held to the duty of good faith, and good faith forbids.
But the exemption does not exist. The exemption would incalculably cripple the public service, the liability would equally promote it; no consideration of justice or policy favors, every consideration of justice and policy forbids the exemption; the liability enlarges, the exemption narrows sovereign action; the liability, not the exemption, is a privilege, and therefore an attribute of sovereignty. The learned counsel for the defense in error, has submitted to us-no adjudication to the contrary, which we should follow as a guide, or respect as advisory; and we are convinced that such an adjudication does not exist. On the other hand, all the analogies of the commercial and maritime law, and the Federal decisions under that law, are directly the other way. In 9 Wheat., 409, St. Jago de Cuba, it was decided in 1824 that seamen and material men, who served *187and supplied the ship after her seizure as a slaver, had respectively liens upon- her against the United States for wages and supplies, and that she stood pledged to them accordingly.
The case of the United States against Wilder, reported in 3 Sumner at page 308, is in point. The government shipped supplies for the public service by the schooner Jasper, from Boston to New York, under the terms of the common bill-of-lading, by which the goods were delivered on pay. ment of freight; the vessel went ashore on Block Island upon her passage; expense was, consequently incurred in saving the cargo, constituting a case of general average in favor of the owners and master of the Jasper, who struck an average of the expense among the freighters, the government included, and refused to deliver the clothing to the latter, on its refusal to provide for its share of the average; the latter conceded that the average was correct, and that it was liable for its proportion claimed of it, but denied that its property could be retained for payment, — that is, denied that the vessel had a lien against the government for contribution. The suit was brought, and the claim thus presented to the United States circuit court for decision; and the claim of lien was sustained, the judges concurring.
In rendering the decision Judge Story said : “ The present ease is not one arising under contract, but by operation of law, and, if I may so say, in invitum. It is a case of general average, where, as in a case of salvage, the right of the party arises from sacrifices made for the common benefit, or labor and services performed for the common safety. Under such circumstances the Creneral Maritime Lato enforces a contribution independent of any notion of contract, upon the ground of justice and equity, according to the maxim, qui sen-tet commodum sentiré debet et onus, and it gives a lien in rent for the contributionIf this is accurate reasoning, it equally applies here; the present case may in like manner be said to arise, not by contract, but by operation of law; the freight money to be an incident to the office of the *188carrier, -who is a public servant, compelled to carry and to insure; and the Commercial Law, which creates the office, and defines its incidents of duty and right to enforce the payment of the freight money by a lien in rem.
But with unfeigned respect for that judge, we dissent from his reasoning as unsound; not as frustrating the principle on'which he based the decision, but as weakening its application. The rights to general average, and to its accompanying lien exist at the Maritime Law; are abstract and dormant in the absence of a contract of shipment; by a contract of shipment become active and attach, and, in case of a loss, creating a general average, though the contract is utterly silent about them, they enure to the carrier, —and manifestly it can be only by contract. So the right to the freight money and to its accompanjdng lien exist at the Commercial Law; are abstract and dormant in the absence of a contract for carriage; by such contract are invoked and attach, though the contract is utterly silent respecting them; and are manifestly contract rights. But, whether the lien attaches under a principle of law, unaided by contract, or under a contract, into the substance and construction of which it enters, it is still a lien, binding the sovereign; and it none the less binds the sovereign, if imposed by contract. Thus the United States v. Wilder, furnishes a threefold sanction to the idea that the Federal government is subject to the carrier’s lien. The case responds to the voice of justice and sound policy; it accords with the analogy of the law, and it has the imprimatur of two judges; as to one of whom, Mr. Justice Davis, of the district court, it may be said, that it would be difficult to find a more reliable member of the American Judiciary; and as to the other of whom, Mr. Justice Story, it may be said, that for conception, for exposition, for admin-stration of the Commercial Law, of which Bailments are a part, he was the most ^accomplished jurist and judge in our language. This case was decided in 1838, and was relied upon as authority, and fully adopted by the supreme court *189of the United States in the case of The Siren, 7 Wallace, 152, and The Davis, 10 Wallace, 15, decided respectively in 1868 and 1S69, in one of which cases it was adjudged that the government was subject’to the lien of a maritime tort, and in the other to the lien for salvage, the same as a private individual is. The boohs show that every description of maritime lien, whether arising by contract, tort or otherwise, other than the carrier’s lien, affects the government and citizens alike; that these liens exist from the necessities of commerce, and the necessities of commerce are the necessities of the public service; it is not simply difficult to perceive, it is rationally impossible to perceive why the same rule should not apply to the carrier’s lien. In the course of his opinion in 3 Sumn., Judge Story said: “ That in all cases of' contract made by the United States, exemption from the ordinary lien attached thereto by the maritime law, is more than I know, or am prepared to admit. Take the case of a shipment of goods, like the present, on board of a coasting vessel for transportation from one port to another, under the terms of a common bill-of-lading, by which the goods are deliverable to the consignee, or his assignees, he or they paying freight. I must say that I am not prepared to declare that the ordinary lien for freight does not attach in such a case, upon the very footing of the terms of the contract, as it would upon a shipment by a private person.” The point which was the subject of this remark, was not before the judge for decision, and was not decided; but the opinion, as an opinion, is strong authority because of its author, and is directly in point, for that case, and the present one, are precisely alike in the matter of a freight lien; the fact that in that case the bill of lading required the freight to be paid before delivery, and the fact that in this one there is no evidence that the condition was expressly reserved by the company, constituting an immaterial difference, inasmuch as the reservation is only what the law implies in its absence. In disposing of this subject, we consider that the entire transaction *190from the making of the original contract to the reception of the property took place in a state of peace. Whether a state of war would constitute an exception, is a matter which we are not required to, and do not determine.
The counsel for the government claims that the district court could render a judgment for, but not against it; we have listened with attention and respect to his argument, advanced in favor of this proposition ; and candor requires us to admit that he has presented it as well as it could be presented; but candor also compels us to say that the proposition is throughout and throughout a fallacy. To what consequence does the proposition lead ? The United States may invoke the jurisdiction of the court; it may accept that which does, and discard that which does not accord with its supposed interests; it may dictate the exercise of the administration of the law; it is not hound by the rules of equal justice; it is a privileged suitor; the district court having rendered a judgment against it, this court must reverse; having rendered one for it, this court can only affirm; it can sit in appeal, must mechanically obey, cannot revise; nay, further, — having brought the suit, and effected a caption, its aim is accomplished; it needs no judgment, for but one judgment can be rendered in the case, and that in its favor; if having made the caption, it neglects to prosecute the writ; a motion to dismiss for want of prosecution will be unavailing; still further, the demand in the writ for judgment -is meaningless, the undertaking of the sureties without force, the writ is superfluous; and the suit is farcical, because it is intended to effectuate under the forms of law what can as well be accomplished by the violent hand under an irresponsible will. Does not the proposition result in a pure reduetio ad ábsurdum? The Federal government cannot at common law be drawn into court. This is a sovereign prerogative, intended 'to protect it not only from rapacious litigation, but from just judgments as well, because the latter could be employed to disturb its due *191control of its property. On the same ground suit cannot be instituted against the property of the government, if the bringing or institution of the suit requires the issuance of process against the government, or the disturbance of its possession of its property. The exemption is personal, and the will to retain is a will to waive it, in the exercise of sovereign interests. When it does waive the privilege invoking the jurisdiction of the court, it submits to that jurisdiction; presenting a claim for its adjudication, it asks that the claim be adjudicated upon its merits — and allowed or rejected acordingly. But the waiver is held to be limited, so as to guard the government against personal judgments. Within this limitation of the waiver, judgments may be obtained against it. If it sues, it is subject to the defense of offset up to the amount of whatever claim it shall establish, — a defense which does not controvert, the claim, but is in the nature of a limited or quasi cross-suit against it; allowed, not to the extent of affirmative remedy beyond, but only to the extent of defeating that claim. 7 Pet., 1., United States v. MeDaniels; 7 Pet., 18, United States v. Ripley; 9 Pet., 319, United States v. Robeson. It is true that this right of offset is created by statute; but it is also true that the statute, in creating it, recognizes this principle of waiver. At common law, however, a suit by the government, subjects its claim to any defense founded upon a defect in the claim itself; such a defense inheres in the suit, the power to sue confers the right of defense, and invokes the full jurisdiction of the court to both sides for the purpose of disposing of it according to its merits. So far this is the present case; the defense here made is founded on defect in the plaintiff’s claim. But the case goes further. It is a suit in rem. The supreme court of the United States applies this rule to all proceedings in rem instituted by the Federal government, namely: That the institution of the proceeding is a waiver of its exemption from suit either against itself or its property, and opens the subject matter *192of the proceeding to all opposing demands, standing towards defendants and claimants precisely like a private suitor, except as to costs and affirmative relief beyond the thing in controversy; the theory of which rule is that the government asks for, and can obtain, only what belongs to it out of the property. Upon this rule, that court disposed of the cases of The St. Jago de Cuba, United States v. Wilder, The Siren, and Davis, each of which was a proceeding in rem instituted by the United States, and in each of which an adversory lien was allowed; the case of the United States v. Wilder was commenced in trover but converted into a suit of detinue by a stipulation that, if the government was exempt from the lien in question, “ the defendant should be defaulted, and the clothing immediately given up ; ” and in the case of The Davis, one Douglas libelled her cargo for salvage and the government intervened as owner, denying the claim, and becoming thus an actor in the controversy. According to this rule, the present suit being a proceeding in rem, the right of the United States is subject to the lien of the Union Pacific Railroad Co.; were the suit regulated by the common law, the judgment would be for a return of the property — exact restoration; but it is regulated by the statute, which, at sections 175 and 180 of the Civil Code, provides for an undertaking with surety to the defendant in at least double the amount of the property, conditioned, that the plaintiff shall duly prosecute the action, and pay all costs and damages that shall be accorded against him; which undertaking need not be signed by the principal, but must be taken before the property is delivered to the plaintiff, and provides that, the property having been delivered to the plaintiff, when the jury shall find for the defendant, they shall also find -whether he had the right of property, or only of its possession at the commencement of the suit, and finding either for him, shall assess his damages, including his attorney’s fees, for which and costs of suit, judgment shall be rendered in his favor against the plaintiff and his sureties. Thus the undertaking is a substitute for the property, and is to be charged with the judgment.
*193Under the distinction above explained, and by which the record would be construed, a judgment for the defendant, in suit of replevin, brought upon this statute, would, were the plaintiff a private person, be a general and personal judgment, also a judgment specifically against the undertaking ; but, the plaintiff being the government, it would be a judgment only against the undertaking, and though we direct such a judgment to be in form entered, we do not mean to say that it would not suffice to limit it in form to one against the surety, for whatever its form, whether entered against the government and surety, or against the latter only, it would in effect be a judgment against the surety alone. At the common law the judgment would not embrace costs, but the government, by instituting the suit, and furnishing the requisite security, elected to provide a fund for the costs, and to accept an advérse judgment charging that fund with the costs; it is therefore con-sistentto embrace the costs in the judgment. In the territorial practice an attorney is what the common law intends by the two capacities of attorney and counsellor; the term attorney fees, in section 180, means the reasonable fees earned in the district court, in the performance of attorney and counsel services on the defense. At the common law such fees could not be embraced in a judgment for the defendant, but under the statute the plaintiff is chargeable with them, as a part of the damages, for the same reason that it is chargeable with the costs. Were we to send the case to the district court, we should direct it to embrace in its judgment the attorney fees, fixed at a reasonable amount upon the principle above stated.
The Company, however, waiving those fees, judgment is rendered for it for 1588.16, and interest from November 20, 1877, as damages, and for the costs of the district court, and those of this court.
Judgment reversed.