Mr. Justice Moore
delivered the opinion of the court.
1. Objection is urged in this court to the complaint on the ground that it does not state facts sufficient to constitute a cause of action, a question not raised in the lower court. The plaintiff’s counsel insists that, after the judgment herein was rendered, the piano was voluntarily surrendered to his client, and, such delivery being evidenced by the abstract, the appeal should be dismissed. These questions will be considered in their inverse order. The rule is settled in this state that a party cannot accept the benefits of a judgment or decree and prosecute an appeal from such determination: Moore v. Floyd, 4 Or. 260; Portland Construction Co. v. O’Neil, 24 Or. 54 (32 Pac. 764); Thomas v. Booth-Kelly Co., 52 Or. 534 (97 Pac. 1078: 132 Am. St. Rep. 713).
2. When a judgment is rendered against a party, his voluntary payment of the sum awarded will not preclude him from maintaining an appeal, unless it satisfactorily appears that the payment was not coerced and was made with a view of settlement: Edwards v. Perkins, 7 Or. 149; Moores v. Moores, 36 Or. 261 (59 Pac. 327).
3. Where, however, a peremptory writ of mandamus has been awarded, requiring the performance of official duty, a compliance with the command necessarily prevents the maintenance of an appeal, because the reversal of the judgment would leave nothing upon which it could operate: Jacksonville School Dist. v. Crowell, 33 Or. 11 (52 Pac. 693); State ex rel. v. Grand Jury, 37 Or. 542 (68 Pac. 208). It was admitted at the trial in this court that plaintiff made and filed the necessary affidavit and gave the required undertaking, so as to secure possession of the piano, but that the defendant resisted a delivery thereof until after the judgment was rendered. We are *57satisfied that the property was not surrendered with a view to a settlement of the controversy.
4. Considering the sufficiency of the complaint, which may be challenged for the first time in this court, it will be kept in mind that this action was commenced May 20, 1908. The complaint alleges, however, that on the 3d of the preceding January plaintiff was the owner of the piano and entitled to the possession thereof. No statement is made in the pleading that at the time the action was instituted plaintiff was entitled to the custody of the property.
The rule announced in Kimball v. Redfield, 33 Or. 292 (54 Pac. 216), is controlling herein, from which it follows that the judgment is reversed, and the cause remanded for such further proceedings as may be necessary not inconsistent with this opinion. Reversed.