This is an application, by order to show cause, for a peremptory *303writ of mandamus, requiring the district court of the county of Meeker, and the judges and clerk thereof, to transfer all of the papers and files in the case of Peter E. Larson against the Minneapolis Threshing-Machine Company, originally commenced in the district court of Meeker county, to the district court of the county of Hennepin.
The respondents make -the preliminary objection that the order which they are called upon to answer is not an order to show cause why a peremptory mandamus should not issue as provided by G-. S. 1894, § 5985. The prayer of the petition, upon which the order was based, and which was served with it, is that a peremptory writ of mandamus issue. The order, although not technically correct, is, in substance, sufficient, taken in connection with the petition. The allegations of the petition are not denied by the respondents, but it is insisted on their behalf: First, that this court has no jurisdiction to issue the writ prayed for; second, if it has, the petition does not state facts sufficient to justify the issuance of the writ. A decision of these questions involves an examination of the admitted facts in this case as stated in the petition. They are, so far as here material, these: *
On March 10, 1899, Peter E. Larson, as plaintiff, commenced an action against the relator, the Minneapolis Threshing-Machine Company, a corporation, in the district court of. the county of Meeker, by serving a summons upon it at the city of Minneapolis. Thereupon, and on March 29, 1899, the relator, by its attorney, served a demand upon the attorney of the plaintiff in the action for a change of venue from the county of Meeker to the county of Hennepin, and at the- same time served upon him an affidavit which, after stating the title of the action and venue, was in these words:
“John M. Eees, being duly sworn, upon oath says that he is the attorney for the defendant in the above-entitled action; that the place of business of the defendant, and its actual residence, and the residence of all of its officers, is now, and for more than one year prior to March 10, 1899, has been in the county of Hennepin and state of Minnesota; that on March 10, 1899, the summons and complaint in this action was served.”
*304Then followed the signature and jurat. After the service of the demand and affidavit, and on the same day, the relator served its answer in the action. On April 13, 1899, the relator duly tendered to the clerk of- the district court of the county of Meeker the demand and affidavit, with proof of the service thereof, for the purpose of having him officially file them in his office, change the venue of the action in accordance with the demand, and transfer all the papers and files in the action to the clerk of the court of the county of Hennepin. The fees of the clerk for such services were also duly tendered to him, which he refused to receive, and also refused to so receive and file the demand and affidavits, and transfer the papers and files in the action. The action was noticed for trial in the district court of the county of Meeker, and was placed upon the calendar of the court for trial by the plaintiff at a term thereof commencing on June 13,1899.
The relator appeared specially, and moved the court to strike the case from the calendar on the ground that the place of trial had been changed from the county of Meeker to the county of Hennepin, and tendered proof of the making and service of the demand and affidavit. The relator, also, in open court, in presence of the presiding judge thereof, tendered to the clerk his fee, with the demand and affidavit, and proof of service thereof for filing, which was refused by the clerk. The presiding judge, however, suggested to the clerk that it was his duty to file all papers tendered. Thereupon the clerk did file the papers so tendered. But the court denied the relator’s motion to strike the case from the calendar, and the presiding judge thereof, in open court, and in presence of the clerk, announced the decision of the court upon the motion to the effect that the place of trial of the action had not been changed from the county of Meeker to the county of Hennepin, and that the cause would be tried in the district court of the county of Meeker; and thereupon the court ordered the action to be tried in that court on July 11,1899, and directed the jury to return on that day to try the action in question. Thereupon the relator applied to this court, and upon its petition, setting forth the foregoing facts, the order to show cause was issued.
1. The contention of the respondents is that this is, in effect, a *305proceeding to secure a writ of mandamus against the clerk of the court, to compel him to perform a ministerial duty, and that this court, under the provisions of the statute, has no jurisdiction to issue the writ against him.
The statute (G. S. 1894, § 5985) provides that the supreme court shall have original jurisdiction to issue the writ only in cases where it is to he directed to a district court, or a judge thereof, in his official capacity. Hence, if this case is, as claimed, in effect a proceeding against the clerk alone, it may be conceded that this court has no jurisdiction in the premises. But such is not this case, for the district court, by the action of its presiding judge, has practically made the refusal of the clerk to transfer the records and files of the action its own refusal, and that of its judge in his official capacity. It now controls such records and files, and it has, by its decision that the venue of the action had not been changed, and by its order setting down the case for trial in Meeker county, in effect and substance' directed the clerk not to transfer the papers and files. The clerk, having knowledge of such decision and order, cannot now transfer the papers and files, without an order of the court or judge thereof, without risk of being punished for contempt of court. ,On the other hand, all the court, or a judge thereof, has to do, in case a mandamus issues in this case, is simply to make an order that the clerk so transfer them. When the court made its decision and order, the clerk ceased to be an actual factor in the case; and he is not a necessary, although a proper, party to this proceeding, which is one, in effect, against the court and the judges thereof in their official capacity. Such being this case, the jurisdiction of this court is unquestioned. G. S. 1894, § 5985.
2. It is claimed that the facts stated in the petition are not sufficient to justify the issuance of the writ, because the relator has a legal remedy other than by mandamus. The statute (Laws 1895, c. 28) provides that:
“If the county designated for that purpose in the complaint is not the proper county, the action may notwithstanding be tried therein, unless the defendant before the time for answering expires demands in writing that the trial be had in the proper county, which demand shall be accompanied by an affidavit of the defendant, his attorney, *306or agent, as to the actual residence of the defendant at the time of the commencement of the action and upon filing due proof of the service of such demand and affidavit upon the attorney of plaintiff in the office of the clerk of the district court in the county in which such action is commenced such action shall thereupon be transferred and the place of trial thereof changed to the county of which such defendant is a resident without any other steps or proceedings whatever. * * * When the place of trial is changed, all other proceedings shall be had in the county to which the place of trial is changed unless otherwise provided by the consent of the parties in writing duly filed, or order of the court, and the papers shall be filed or transferred accordingly.”
The meaning of this statute is plain. If a defendant complies with its provisions, he has an absolute right to have the venue changed to the county of his alleged residence. The action cannot be retained in the county in which the venue was originally laid, for the purpose of traversing the allegations of the affidavit as to defendant’s residence, or for the hearing of a motion to retain the case for the convenience of witnesses. If the plaintiff wishes to challenge the truth of the affidavit as to the defendant’s residence, his remedy is to move the court in the county to which the venue is changed by the demand and affidavit to remand the case on the ground that the defendant is in fact a resident of the county in which the action was originally brought. If a defendant complies with this statute, and makes the demand and affidavit, and files them, with proof of service thereof, in the office of clerk of the court, the place of trial is ipso facto changed, and the defendant has an absolute right to have the papers and files transferred to the district court of the proper county. Flowers v. Bartlett, 66 Minn. 213, 68 N. W. 976.
Now, the relator, if its affidavit was sufficient, has done all in its power to secure its rights; yet the district court of the county of Meeker retains’the case and the papers and files therein, and has set the case for trial. The only remedy the relator has, other than mandamus, is to appeal from the judgment, or perhaps from an order denying a new trial, after trial. Carpenter v. Comfort, 22 Minn. 539. Such a remedy is not adequate, because to secure it the defendant is obliged to abandon his case, and let the plaintiff proceed to judgment, and then appeal, thereby losing his opportunity *307to make a defense on the merits in case the order is affirmed, or he must take part in what is in fact a moot trial, if it is decided on appeal that he had complied with the statute, and the venue was thereby changed. In such a case there is no more reason for denying him a remedy by mandamus than there would be to deny a writ of prohibition where it appeared prima facie that the court threatening to proceed had no jurisdiction at all to deal with the case, on the ground that there was a remedy by an appeal from the judgment. The other legal remedy which will defeat mandamus must be one which is reasonably efficient and adequate to reach the end intended, and actually compel the performance of the duty refused. 13 Enc. PI. & Pr. 498. There is no question of discretion in this case. If the relator has complied, or tendered compliance, with the statute, he is entitled to have the action and the papers and files transferred to the proper county. He has no other adequate remedy, except by mandamus.
Lastly, it is claimed by the respondents that the affidavit as to the residence of the relator was not sufficient, in that it did not state that it did not have an office, agent, or place of business in Meeker county. G-. S. 1894, § 5185, provides that
“A corporation shall be deemed to reside in any county where it has an office, agent, or place of business, within the meaning of this section.”
It is the contention of the respondents that if the relator had such office, agent, or place of business in the county of Meeker, it was a resident therein; hence, the affidavit should have negatived the provision of this statute. It is not necessary to construe this statute, for it is not the one under which the relator proceeded in its attempts to secure the change of venue. The affidavit complies with the provisions of Laws 1895, c. 28, and is sufficient.
Let the writ issue.