An action was begun against, the plaintiff herein for the September, 1896, term of the district court *248of Worth county, charging him with the illegal sale of intoxicating liquors in a certain, building located in the town of Grafton, in that county, and praying that he be restrained from continuing the nuisance. Notice of such action was duly served upon the plaintiff, and he appeared thereto and defended. At the January, 1897, term of said court, the case was finally heard, and a decree entered therein finding that the defendant, William Ohlrogg, was maintaining a nuisance on the premises described at the time suit was commenced, and perpetually enjoining him from continuing the same. The. decree also stated that the defendant was not the owner of the premises during the time that he was using them for the illegal sale of liquors, and that “ since said time the premises have been sold to J. H. Hovel, and possession thereof given.” In September, 1902, information was filed charging the defendant, Ohlrogg, with contempt for thte violation of the injunction. The evidence clearly establishes the fact that he maintained a nuisance in the building in question between the date of decree and the filing of the information, and the only question remaining for our determination is as to the validity of the decree enjoining him from so doing.
It is contended that because of the recital in the decree that at the time of the trial the premises had changed hands, and “ possession thereof given,” the decree was void, and liad no restraining force or effect. If it be conceded, for the purpose of this case, that the decree may fairly be construed to hold that at its date the premises had in fact passed from the control of Ohlrogg, it does not follow that the injunction order was void. The court had jurisdiction of the parties and of the subject-matter, and when it was determined upon the trial in January, 1897, that the defendant was maintaining a nuisance in the building at the time the suit was brought, the court had the undoubted right to restrain him from continuing the same. If it had been made to appear that the nuisance had in fact been abated by the *249defendant at the time of the trial, it would then have been a matter of discretion with the court to issue the injunction, or not; depending upon its conclusion as to the good faith of the party in so doing. Judge v. Kribs, et al., 71 Iowa, 183. The record herein shows that a contract for the sale of the premises was made after the notice had been issued in the suit begun in 1896, and that, if there ever was in fact a change of possession thereof, it was not until after a temporary writ of injunction had been issued and served. Furthermore, it clearly appears that, notwithstanding such pretended sale and change of premises, the defendant was soon again caught dispensing liquor in the same building. The decree was not void absolutely, and, however irregular or erroneous, it was still in force and valid until set aside in direct proceedings. Finch v. Hollenger, 41 Iowa, 173; McCrillis v. Harrison County, 63 Iowa, 592; Blanchard v. Ware, 31 Iowa, 305. And when the court has jurisdiction of the parties and of the subject-matter and authority .to make the order, the injunction must be obeyed, however erroneously made. Jordon v. Circuit Court, 69 Iowa, 177; State v. Circuit Court, 98 Wis. 143; 16 Am. & Eng. Enc. of Law, 438; and cases cited. The cases cited and relied upon by the plaintiff are not in conflict with this conclusion. There was no error in permitting an amendment to the information.
The judgment of the district court was right, and this proceeding is dismissed.