The opinion of the court was delivered by
Dawson, J.:The plaintiffs brought mandamus to compel the defendant to supply plaintiffs with gas at their city residence in Galena. The defendant raised two defenses in its answer and return to the alternative writ — (1) that the matter was one which should have been presented in the first instance to the public utilities commission; and (2) that the gas pipes in the plaintiffs’ residence were defective and leaking *85and that it would be dangerous to turn on the gas and might subject the defendant to liability. The defendant avowed its readiness to furnish gas as soon as the gas pipes in the plaintiffs’ residence were repaired, but that it had never been notified that repairs had been made.
At the hearing below, the evidence for plaintiffs tended to Show — and as the trial court gave credence to it, this court must do likewise — that the reason given to plaintiffs by the defendant for its refusal to turn on the gas was that plaintiffs were in collusion with the tenants who had preceded them in the occupancy of the residence and who had not paid their gas bill. But the plaintiffs admitted that the gas pipes in the house were leaking; the defendant had pleaded and the evidence clearly established that fact; and there was no evidence that the defective pipes had been repaired by plaintiffs or their landlord. Nevertheless, the trial court gave judgment for plaintiffs, and ordered the defendant forthwith to turn on the gas at plaintiffs’ residence.
Was that judgment correct? It seems superfluous to scrutinize all the details of the public-utilities acts to determine whether defendant is right or wrong on its first contention. The second part of defendant’s answer alleged that the gas pipes in the house were leaking, but that it was ready and willing to turn on the gas as soon as they were repaired. Plaintiffs themselves testified that the defendant’s service man turned on the gas and found three leaks, and stopped one of them by the use of a knife. The others were not stopped because the plaintiffs could not furnish him with a wrench. The service man then turned off the gas. By the judgment of the trial court the defendant must turn it on again regardless of the leaks in the gas pipes in plaintiffs’ residence.
It is not pretended that it was the defendant’s corporate duty to repair the gas pipes in the residence; and the city ordinance charged the defendant with the duty to use every reasonable precaution to avoid damage or injury' to persons and property in operating its gas system. Of course the general principles of law are to the same effect. It needs no evidence to establish the fact that leaking gas pipes are fraught with great danger to life and property. The evidence for the defendant — which might have been disbelieved by the trial *86court but for the fact that plaintiffs’ evidence was largely to the same effect — was that the defendant’s inspector found three leaks in the gas pipes in the residence, and that he did not repair any of them, but simply shut off the gas as it was his duty to do. No showing was made that the gas pipes were ever repaired, nor has the defendant been notified that such repairs have yet been made. In such a situation it seems clear that it was error to order the gas turned on, and the writ of mandamus should not have issued.
An action in mandamus is a very different thing from an action on a debt or for damages or the like, where judgment as prayed for goes as a matter of course to the prevailing party, and where the court is absolutely bound to give such judgment. Mandamus is a discretionary writ, and before granting it the court may and should look to the larger, public interest which may be concerned — an interest which the private litigants are apt to overlook when striving for their private ends. (The State, ex rel. Wells, v. Marston, 6 Kan. 524, 537; A. T. & S. F. Rld. Co. v. Comm’rs of Jefferson Co., 12 Kan. 127, 136; Golden v. Elliott, 13 Kan. 92, 95; The State v. Stevens, 23 Kan. 456; The State, ex rel., v. Comm’rs. of Phillips County, 26 Kan. 419, 425.)
In 26 Cyc. 143 et seq., it is said:
“It is often said in modern opinions that the proceeding by mandamus has lost its prerogative character and become-an ordinary civil action to enforce legal rights, from which it is sometimes said to result that the writ issues as a matter of right. It will be found, however, that there is little real or substantial conflict in the authorities. The writ is employed only in unusual cases where other remedies fail, and it is hedged about by many conditions totally inapplicable to the ordinary suit at law. The applicant must in all cases substantially demonstrate the propriety and justice of his case. Nor is the court bound to take the case as the applicant presents it. ■ It may consider defendant’s rights, the interest of third persons, the importance or unimportance of the case, and the applicant’s conduct, in determining whether or not the writ shall go.
“Mandamus may be refused where the public interest would be injuriously affected, and it will not issue to compel the performance of an act which will work a public and private mischief.” (p. 146.)
The judgment is reversed, and the cause is remanded with instructions that it be dismissed.