The petition in the instant action alleges that at a prior time named these defendants commenced an actipn in the Mahaska district court, against one Boyer for an injunction; that in such action a temporary writ was prayed for, and the same was granted and did issue upon the filing of the bond here sued lipón. It is then alleged that upon motion of said Boyer the temporary writ thus issued was dissolved. Damages consequent upon the wrongful issue of the writ are alleged, and it is said that the same and the claim therefor arise out of the fact that said Boyer was compelled to and did employ attorneys to procure the writ to be dissolved, and that the said Boyer thereby became obligated to pay the fees of such attorneys. It is then said that the claim thus arising in favor of said Boyer has been assigned in writing to this plaintiff; that such “ attorney’s fees are now due and payable, and the plaintiffs are entitled to recover the same from the said defendants.” The defendants answered, denying that there had been any breach of the bond alleged, and denying that there was anything due upon the same. At the trial evidence addressed to the merits was offered and introduced by each of the parties, and at the close thereof, as shown by the record, this appears: “ It is conceded that the case of Davis v. Boyer for injunction is still in this court for trial upon its merits.” The court havin'? announced as a conclusion .that plaintiffs were *677entitled to recover, the defendants thereupon filed a motion in arrest of judgment, the grounds therefor being stated: (1) The facts stated in the petition do not entitle plaintiffs to any relief. (2) The cause of action upon which plaintiffs’ claim is based has not accrued, and their action is prematurely brought. This motion was overruled, and judgment was entered against defendants for the amount of plaintiffs’ claim, with costs.
Undoubtedly it is the rule that a right of action does not accrue upon a bond given for the issuance of a temporary writ of injunction until The main action has been tried and determined. Bank v. Gifford, 65 Iowa, 648; Bemis v. Gannett, 8 Neb. 236; Dowling v. Polack, 18 Cal. 626; Penny v. Holberg, 53 Miss. 567; High on Injunctions, section 1649. The reasons for the rule are sufficiently set forth in the opinion in Bank v. Gifford.
The only question in the instant case, therefore, is whether the steps taken by the defendants were appropriate to avail themselves of the benefit of the fact thus conceded respecting the then pendency of the main action. We are of the opinion that such question must be answered in the affirmative. It wilTbe observed that it is the allegation of the petition that the attorney’s fees are due and payable. It may be assumed that such became due, as between Boyer and his attorneys, at once upon the services being performed. But the question made by the answer of the defendants in this case has relation to the damages arising in favor of Boyer as against these defendants, and it is to such claim for damage that the rule announced in Bank v. Gifford has application. Had the allegation been that the damages sustained by Boyer had become due and payable, there might have been ground to urge, in the absence of a motion for more specific statement, at least, that the petition was not subject to be assailed by motion in arrest; but such is not the case we are called upon to determíne. A motion in arrest of judgment is allowable when the pleadings of the prevailing *678party wholly fail to state a cause of action or defense. Cdde, section 3758. As the petition in this case did not' state a cause of action, in that the material allegation that the main injunction suit had been tried or disposed of was lacking, it follows that the trial court erred in entering judgment against the defendants, and such judgment must be, and it is, reversed.