delivered the opinion of the Court.
The question presented by this appeal arises on a demurrer to the sixth count of the plaintiff’s declaration; the other counts having been withdrawn. The action is in assumpsit and was instituted by the appellant against the County Commissioners of Somerset County.- It appears by the record that the plaintiff, who' is an infant under the’ age of twenty-one years, was, on the eighth day of June, eighteen hundred and ninety-four, required by a justice of the peace to give security for his appearance as a witness for the State against one Isaac Kemp, charged with the murder of a certain Edward Carver; that being unable to furnish a bond for his appearance to give testimony, he was committed to the custody of the sheriff of Somerset County, there to be detained and kept as a witness for the prosecution ; that the record of the case was removed from Somerset County to the Criminal Court of Baltimore City, and upon its transmission the plaintiff was taken by the sheriff of the county and delivered to the sheriff of Baltimore City and was held in custody as a witness by the latter until the trial of the accused when, on the fourth of February, eighteen hundred and ninety-five, he was, after testifying for the State, released and discharged. In July following, he, by his mother as next friend, brought suit against the County Commissioners to recover his per diem of one dollar for each of the two hundred and forty-two days he was so detained as a witness. The Court below held upon the demurrer that he could not recover and from the judgment entered against him this appeal was taken. The inquiry presented is whether the plaintiff is entitled to the compensation which he claims.
The provision of the Code relating to the compensation of witnesses is in these words: “ There shall be allowed to each witness attending the Circuit Court for the counties, *620the sum of one dollar for each day such witness shall attend for the discharge of his duty * * * * ” Code, Art-35, sec. io. By section 7 of Art. 25 of the Code, which defines some óf the duties of the County Commissioners, it is declared that “they,” the County Commissioners, “shall provide for the support of the Courts, compensate jurors and county or State witnesses * * * * * and pay and discharge all claims on or against the county which have been expressly or impliedly authorized by law.” And 'by sec. 13 of Art. '35 of the Code, which is almost a literal transcript of the Act of 1752, ch. 13, it is enacted: “Where a witness against any person accused of a crime cannot find security for his appearance to testify against the person so accused, and for want of such security shall be committed to prison, the county where the prosecution shall be carried on shall be chargeable with and pay the imprisonment fees of such witness ; and the County Commissioners or the Mayor and City Council of Baltimore shall levy the same from time to time, as the case may require.”
Lord Hale, 2 H. P. C. 282, states that there are two compulsory means to bring in witnesses, which are (first) by process of subpoena issued in the King’s name by the justices of the peace, oyer and terminer, gaoh delivery, or King’s Bench, where the plea of not guilty is to be tried; and (secondly), which is the more ordinary and more effectual means, the justices or coroner that take the examination of the person accused, and the information of the witnesses, may at that time, or at any time after, and before the trial, bind over the witnesses to appear at the sessions, and in case of their refusal either to come or to be bound over, may commit them for their contempt on such refusal.
Now, whilst sec. 13 of Art. 35 of the Code clearly recognizes the power of a magistrate to commit a witness in order that his attendance to testify against a person accused of crime may be secured, it is a power which can only be exerted after the witness fails to give such reasonable security for his appearance as may be demanded of him. He may *621fail to enter into a recognizance for his appearance, either because, though able to furnish it, he becomes contumacious; or, because, though willing to give it, he is unable to do so. This inability may arise from his poverty or other like innocent cause; or from his bad character and ill-repute. If he belongs to the first category and is imprisoned, his imprisonment is obviously the consequence of his voluntary choice and, under such circumstances, he would have no claim to be compensated out of the public treasury for a detention resulting solely from his own deliberate election. Not being a witness who could not find security for his appearance to testify, he would not have been entitled under the Act of 1752 to have even his imprisonment fees paid by the county. If, on the other hand, his imprisonment has grown out of his non-culpable inability to find security for his appearance as a witness, quite a different condition is presented. His inability to enter into a recognizance is, or may be, his misfortune rather than his fault. And his subsequent commitment, in such an event, would in no sense be the result of his own misconduct or fault. If he be poor, a stranger without acquaintances in the community where by accident he happens to witness a violation of the law, and because of being so circumstanced he finds himself unable to furnish the security required of him, and is thereupon detained in custody as a witness for the State, the gravest injury might be inflicted upon him and upon those who are dependent on his toil and labor for their sustenance, if he were denied compensation for the period whilst involuntarily restrained of his liberty for the benefit of the public, but for no crime or misprision of his own. For an honest, law-abiding but poor and friendless individual to be confined in a common jail, and there forcibly made the companion of criminals and of the depraved, merely because he is unable, through no fault of his own, to find security for his appearance as a witness in behalf of the commonwealth is bad enough ; but when in addition to this, by that very confinement he is deprived of pursuing his avocation, and then is refused compensation as *622a witness except for the few days he may be actually within the Court room whilst the trial is in progress, his situation is made immeasurably worse. He is subjected to the same treatment that a criminal is, though confessedly not guilty, or even accused, of crime ; and he is deprived of his liberty and his means of livelihood, and denied compensation as a witness, though charged with no transgression of the law. To warrant such a result, even if it ever could be justified, there ought to be the most unequivocal statutory sanction. The plaintiff was committed, and held distinctively and exclusively as a witness for and in behalf of the State. It was in his capacity as a witness for the prosecution, and solely because he was such a witness, that he was or could have been detained at all;. and this detention must be treated as a constructive attendance upon the Court, unless the flagrant injustice and great hardship which the contrary view will inevitably entail be deliberately inflicted and sanctioned. As, then, the plaintiff was held in custody only because he was a witness for the State, and as it is the duty of the County Commissioners to compensate State witnesses and to pay all claims against the county which have been expressly or impliedly authorized by law; and "as he must be considered while in custody as constructively in attendance upon the Court, he is entitled to the per diem fee allowed by law for each day he was thus in attendance “ for the discharge of his duty,” as well as for the days he was actually in the Court room during the trial, if he was, through no fault of his own, unable to furnish the bail required.
A direct precedent for this conclusion is -found in Higginson's case, 1 Cranch C. C. 73, where the Court allowed compensation to such a witness for the whole period of her detention. The attorney for the United States relied upon the Maryland statute of 1752, ch. 13, heretofore alluded to, and contended that its provisions only embraced the payment of prison fees, and did not include an allowance for the time of the witness; but the Court in deciding in favor of the witness made no reference to the statute and treated *623her inability to enter into a recognizance as her misfortune rather than her fault. And so in Robinson v. Chambers, 94 Mich. 471; S. C., 20 L. R. A. 57, it was held that a witness detained by the Court in default of bail to appear in a criminal case is to be deemed in attendance upon the Court during the entire period of detention within the Michigan statute which by sec. 9064 and 9065, Howell’s Statutes, entitles witnesses attending in a Court of Record to the sum of one dollar for each day. See also Hutchins v. State, 8 Mo. 288, where a Louisiana case directly in point is referred to and is thus stated, though the names of the parties are not given. “McFall was on a trading voyage from Kentucky and recognized and detained till the trial, not having time to go home. His per diem fees were allowed from the date of his recognizance, but not mileage.” In Markwell v. Warren Co., 53 Iowa, 422, it was held that a witness whilst detained in jail was not in attendance on Court, but the decision is founded on the theory that the detention of the witness was due, not to his inability to find a surety, but to the fact that he could not be trusted to perform his duty as a citizen voluntarily and without compulsion. The Iowa Court conceded the hardship to the witness but treated him as to some extent in fault, because it assumed that the magistrate must have found that the witness could not be trusted, to appear without security. “ But this,” as justly observed in the note to Robinso?i’s case, 20 L. R. A. 57, “ depended entirely on the impression which the witness made upon the magistrate, and it is easy to see that, in many cases, the magistrate might have a bad impression as to the trustworthiness of the witness without any fault of the latter.”
If it should appear that a witness could not find security for his appearance because his character is so bad that those who know him refuse to become bound for him, he will have no claim to be compensated, if he should be detained as a witness. His inability to furnish security would then he the result of his own fault and not of his misfortune, and the reason for treating him as entitled to a per diem whilst *624in custody would not exist. He will not be allowed to invoke and rely on his own bad character to secure for himself compensation as a witness when but for that bad character he would not have been compelled to undergo a detention.
We hold, then, first, that if a witness can, but will not, give security for his appearance and is committed for his refusal, he will not be entitled to a per diem fee during any part of the time he may be detained to secure his attendance. Secondly, that if his inability to find security results from his own misconduct or bad character he will equally not be entitled to a per diem fee. Thirdly, that if he be committed because of inability to furnish a recognizance, and if this inability arises from his misfortune and not from his fault, he will be considered as in attendance on the Court and entitled for the term of his detention.
We have said the pending action was in assumpsit and in this respect we apprehend the form of the remedy has been misconceived. There is no element of assumpsit in the case. The appropriate proceeding was by mandamus to compel the County Commissioners to make a levy for the amount due to the appellant, if anything was in reality due to him. If, upon such a proceeding, it should appear that the witness had refused, though able, to give the security, or that he was unable to give it by reason of his misconduct, he would not be entitled to compensation; but if it should be shown that he failed to furnish a bond because he was unable by reason of his misfortune and by reason of no fault of his own, then he would obviously be'entitled to relief; provided he has brought himself within the provisions of sec. 10 of Art. 35 of the Code, by having procured from the Clerk of the Court, within thirty days after such attendance was rendered, a certificate or order showing the amount due him for such attendance.
As in the present form of action a recovery cannot be had, the Court below was right in sustaining the demurrer, and its judgment must therefore be affirmed, but without pre*625judice to the right of the appellant to invoke the appropriate remedy, if he sees fit to do so.
(Decided March 24th, 1896.)Judgment affirmed with costs above and below, but without prejudice.
Page and Briscoe, JJ., agree to the conclusion, but dissent from the construction of the statute.