
127 Cal.App.2d 377 (1954)
GEORGE HOLMES et al., Respondents,
v.
HARVEY C. WILLIAMS et al., Defendants; CYRIL SAUNDERS, Appellant.
Civ. No. 15939. 
California Court of Appeals. First Dist., Div. One.  
Sept. 14, 1954.
 Cyril Saunders, in pro per., for Appellant.
 John W. Bussey for Respondents.
 WOOD (Fred B.), J.
 Plaintiffs recovered judgment against the defendants in the sum of $3,200 for the value of a certain automobile.
 Upon the judgment roll appeal of defendant Cyril Saunders, the judgment was reversed upon the ground that the record, including the complaint and the findings of fact, demonstrated that plaintiffs' cause of action depended upon their success in a lottery, "which is a criminal offense," and therefore "the doors of the courts are closed to them. (6 Cal.Jur., Contracts,  106, pp. 150-152.)" (Holmes v. Saunders, 114 Cal.App.2d 389, 391 [250 P.2d 269].)
 While the former appeal was pending, property of defendant Cyril Saunders was sold pursuant to writ of execution issued upon the judgment. The sheriff's return shows that the net receipts of the sale which he applied in partial satisfaction of the writ amounted to $1,717.32.
 After the decision upon the former appeal became final, defendant Saunders moved the trial court for judgment *379 against plaintiffs for costs expended by him and for restitution of the moneys received by plaintiffs as proceeds of the execution sale. The court by judgment and order in writing awarded Saunders $483.18 to cover his costs but denied restitution. Saunders has appealed. There being no basis for disturbing the portion of the judgment and order which awarded costs, that portion should be affirmed. We will consider the portion thereof which denied restitution.
 [1] We find the applicable principles of law stated in Schubert v. Bates, 30 Cal.2d 785 [185 P.2d 793]: "The power of the appellate courts to restore benefits lost pursuant to a judgment modified or reversed exists by virtue of sections 957 and 988f of the Code of Civil Procedure. But the power of a court whose order or judgment has been reversed to order restoration after reversal is inherent in that court. [Citations.]" (P. 789.) [2] "The exercise of power to restore benefits after reversal has been declared to be discretionary. [Citations.]" (P. 791.) [3] "In Bank of America v. McLaughlin, supra (37 Cal.App.2d 415, at 417 [99 P.2d 548]), it was indicated that 'a party is ordinarily entitled to restitution after a reversal of a judgment if he has been deprived of property by virtue of said judgment or by virtue of process issued upon said judgment.' [4] The rule is stated as follows in Restatement of the Law of Restitution, section 74: 'A person who has conferred a benefit upon another in compliance with a judgment, or whose property has been taken thereunder, is entitled to restitution if the judgment is reversed or set aside, unless restitution would be inequitable or the parties contract that payment is to be final; if the judgment is modified, there is a right to restitution of the excess.' " (P. 791.)
 We take it that the "discretionary" element mentioned is a sound discretion controlled by equitable principles, essentially the same concept as that expressed in different words in section 74 of the Restatement; i.e., a right to restitution if the judgment is reversed or set aside "unless restitution would be inequitable or the parties contract that payment is to be final." Thus, in Bank of America v. McLaughlin, supra, 37 Cal.App.2d 415, the court affirmed (as not an abuse of discretion) an order which denied restitution because under the circumstances of the case restitution would be inequitable. The court said, "It would obviously be inequitable to permit defendants to obtain a reversal of the judgment on the main appeal by reason of their alleged *380 payment of the rental by the storage of the crops in plaintiff's name and then to permit defendants to obtain restitution of the proceeds of the sale of said crops by reason of said reversal of the judgment. Defendants took the benefit of their acts in storing said crops in plaintiff's name in payment of the rental and they must bear the burden." (Pp. 418-419, emphasis added.)
 [5] In our case, the record discloses no facts which tend to indicate that restitution would be inequitable. Plaintiffs obtained $1,717.32 by the forced sale of defendant Saunders' property. The money judgment pursuant to which the sale was made has been voided upon grounds which render a new trial futile and bar any possible recovery by the plaintiffs from Saunders. For them to retain the money thus collected would be an unjust enrichment.
 Plaintiffs, however, contend that there are equities in their favor which defeat any right Saunders might otherwise have to obtain restitution.
 They say, as appears to be the fact, that the property of Saunders which was sold in partial satisfaction of the former judgment was the very property (an automobile) which was the prize in the lottery in which they drew the winning number. With this as a premise, they argue that the levy and sale of this automobile operated as a consummation of the illegal lottery transaction; that, although a person may under some circumstances withdraw from an illegal contract while it is executory, he cannot do so after it has been executed, especially when he is in pari delicto; hence, the courts cannot come to Saunders' aid and make restitution, no more than they could award plaintiffs a judgment against Saunders on the lottery contract. For most of these asserted facts, plaintiffs frankly go outside the record. We cannot follow them. However, the record furnishes a sufficient answer to their contention. The forced sale of the automobile was certainly no voluntary act of Saunders, does not token a delivery by him of the prize in "execution" of the illegal lottery contract.  [fn. *] Instead, his failure voluntarily to deliver is consistent with his claim, also made dehors the record, that he personally took no active part in the lottery transaction *381 and from the time he first learned of it, sought to get out of it. Even the findings of fact, made upon the former trial, state that the defendants repeatedly and continuously refused to deliver the automobile to the plaintiffs. Especially significant is the fact that the execution sale of the automobile was not a delivery of that automobile by Saunders to the plaintiffs in execution of the illegal contract or of any contract or at all. It was simply a levy upon and sale of property belonging to a judgment debtor. It had no more bearing upon the lottery transaction than if it were an execution sale of other property of Saunders, such as a house and lot, a bank credit, or stocks and bonds which bear no relation whatsoever to the lottery transaction.
 Another argument which plaintiffs make is that the automobile which they caused to be sold in execution of the former judgment had been forfeited by Saunders to the state;  [fn. ] hence, its sale at their instance was no loss to him. The state's right of forfeiture is for the state, not the plaintiffs, to raise. There is nothing in the record to indicate that the state has yet filed an information, under authority of section 325 of the Penal Code, to assert its right of forfeiture and to recover the automobile. (The record indicates that the lottery was held in the early part of 1948.) Moreover, the purchaser at the execution sale may have acquired rights which would defeat such a forfeiture to the state.
 Inasmuch as there is no conflict in the evidence as to the amount of restitution to which he is entitled, defendant Saunders should recover judgment for $1,717.32, the amount which plaintiffs collected upon the former judgment, in addition to the $483.18 awarded as costs.
 The judgment appealed from is reversed insofar as it denies recovery in excess of $483.18, and the trial court is directed to make findings of fact, conclusions of law and enter judgment in accordance with the views herein expressed. Appellant will recover his costs upon this appeal.
 Peters, P. J., and Bray, J., concurred.
NOTES
[fn. *]  *. It is a strange argument which in effect makes the court and its officers the agents of an unwilling and protesting defendant in the consummation of an illegal transaction of his when the very judgment thereby executed had later to be voided because of a lack of power in the courts to aid the opposite parties in consummating the very same transaction.
[fn. ]  . In this, plaintiffs rely upon section 325 of the Penal Code.
