The opinion of the court was delivered by
Johnston, J.:
On March 29, 1890, H. B. Hughbanks, a resident of Osage City, in Osage county, went on a business trip to Emporia, in Lyon county, and while temporarily there *106was served with a subpena issued by a justice of the peace of Emporia, commanding him to appear before that officer on April 2,1890, and give his testimony and deposition to be read in a case then pending in the district court of Lyon county.
When the subpena was served on Hughbanks, he demanded his fees, and the constable who served the subpena produced and tendered to Hughbanks the sum of $1.50, as witness fees, which, after some hesitation, he declined to receive. He failed to appear before the officer on April 2, 1890, in obedience to the command of the subpena, and thereupon, at the instance of the party seeking to take his deposition, he was attached for contempt and taken before the justice of the peace issuing the subpena, who, after an investigation and trial, found him guilty of contempt in disobeying the subpena, and adjudged that he should pay a fine of $1, and the costs of the' attachment proceedings, taxed at $14, and that he be committed until the fine and costs were paid. Befusing to pay the fine, he was imprisoned, and has applied to this court to be released upon the writ of habeas corpus.
The petitioner bases his right to a discharge upon two grounds: First, That he is a resident of Osage county and was not obliged to attend and give his deposition in Lyon county; and second, that the tender of the fees demanded by him was insufficient to compel obedience to the subpena.
The question whether a person may be subpenaed and required to attend to give his deposition at some future time in some county distant from the one in which he resides, is the pi’incipal and controlling one in the case. It is the general theory of the code that a witness in a civil case shall not be compelled to travel beyond the county of his residence either to testify orally in court or to give his deposition to be used in court. Section 328 provides: “A witness shall not be compelled to attend for examination on the trial of a civil action except in the county of his residence, nor to attend to give his deposition out of the county where he resides or where he may be when the subpena is served upon him.” Provision is made that the deposition of a witness may be used in the trial of an *107action when he does not reside in the county where the trial occurs. (Civil Code, § 346.) It is further provided that a person confined in any prison in the state may be produced as a witness for oral examination in-the county where he is imprisoned; but in all other cases his examination must be by deposition. (Civil Code, § 335.) The statute contemplates that a witness shall be paid mileage fees for the distance which he actually and necessarily travels in attending before a court oran officer to give his testimony or deposition, but it does not contemplate that a subpena sent from another county may be served upon him, nor that he is entitled to mileage fees for traveling from the county of his residence to another county in obedience to such subpena. (Mylius v. Rld. Co., 31 Kas. 232.) If a party is present where a trial is in progress or a deposition is being taken pursuant to a notice previously given, he may be subpenaed or called to appear forthwith and give his testimony, whether he resides in or out of the county.
But the respondent now contends that under § 328, Hugh-banks, who happened to be in Emporia for a day, and was there subpenaed to attend before a justice of the peace on a future day, can be compelled to return from his residence in Osage county to Emporia and give his deposition. The parties in whose behalf the deposition was to be taken were aware of his place of residence, and that his presence in Emporia was temporary, and also that his deposition, which was wholly for 'their benefit, could be taken at Osage City in the manner provided by statute without hindrance or difficulty. If a witness can be subpenaed to attend four days in the future, as in this case, he can be subpenaed many days thereafter, and if he is obliged to return from his residence, thirty miles away, in another county, he may be required to travel across the entire state, a distance of four hundred miles. Under this theory, a resident of Wallace county who chanced to be in Wyandotte county might be there subpenaed to attend and give his deposition before a justice of the peace of Wyandotte county thirty days thereafter, thus obliging the witness to travel a distance of eight hundred miles in going and returning; and all this *108travel and inconvenience would be imposed upon him for the benefit of another, and one who could have taken his deposition in Wallace county without much inconvenience or trouble either to the witness or to himself. It certainly will not be contended that a resident of Cheyenne county who happened to be traveling by rail through Cherokee county, and was there subpenaed during a temporary stop of the train to appear before a notary public of Cherokee county a month afterward to give his deposition, should be obliged to discontinue his journey or remain away from his home and business for thirty days upon the payment of $1.50, the fee for one day’s attendance. If it was conceded that the witness was entitled to mileage in such case, the fees for travel from Cheyenne county to Cherokee county and return, a distance of about one thousand miles by the usual route, at ten cents per mile, would amount to about $100, when his depositen could be taken at his residence in Cheyenne county for a trifling amount. If this practice was permissible, a plaintiff who was certain of recovering at least a portion of the amount claimed in the action, and therefore sure of a judgment for costs, might with safety to himself harass the defendant by bringing witnesses great distances and thus largely and oppressively increase the mileage fees that the defendant would be obliged to pay.
*109not obliged to obey. *108But as we have seen, the statute does not contemplate that a party may be liable to pay mileage fees to a witness in a civil case for traveling beyond the county in which the service of the subpena is made. The last clause of § 328 gives rise to doubt as to the intent of the legislature, but when it is considered in connection with the other provisions of the code upon the same subject it may be given effect and harmonized with them. It is argued that this clause requires the witness to attend in any county where the subpena may be served upon him, regardless of how distant the place may be from the county of his residence. This clause evidently relates back to the first part of the section concerning the attendance of a witness in court as well as his attendance to give his deposition; and if it is given the effect claimed, the preceding words would be *109practieally meaningless and the different parts of the section contradictory. According to that interpretation, a witness is not obliged to attend. the trial of a civil action or before an officer to give his deposition outside of the county of his residence, and he is obliged to attend in any county outside of his residence whenever a subpena is served upon him. By the first part of the section he would not be required to go outside of his county, and by the last he would. The view insisted on by the respondent is contrary to the general theory and spirit of the code, and practically nullifies other of its provisions relating to witnesses and the fees for travel to which they are entitled. The more reasonable view of the statutes is that the witness cannot be compelled to go beyond his county to give his testimony or deposition, and is not entitled to mileage fees for travel outside of the county where the service is made; but if he happens to be in a county other than where he resides, and a trial is in progress or a deposition is being regularly taken, he may be required to appear forthwith and testify, but cannot be compelled to obey a subpena which would require him to return from his ..... . . county and give his testimony at some later time, By this interpretation effect is given to the clause in question without placing it out of harmony with other provisions upon the same subject. If the view suggested — that the witness was obliged to return to Emporia on April 2, and was entitled to mileage fees for going and returning — was correct, then he would not be in contempt, for the reason that he demanded his fees, and it appears that only $1.50 was tendered; no fees were tendered to him for travel to and from Osage City, where he resided. In our opinion, however, the matter of tender was not involved in the proceeding, as the petitioner was not obliged to obey the subpena; and therefore we must, hold his imprisonment to be illegal.
He will be discharged.
All the Justices concurring.