
266 Cal.App.2d 763 (1968)
ELYSIUM, INC., Petitioner,
v.
THE SUPERIOR COURT OF LOS ANGELES COUNTY, Respondent; COWLES MAGAZINES AND BROADCASTING, INC., Real Party in Interest.
Civ. No. 33518. 
California Court of Appeals. Second Dist., Div. Four.  
Oct. 23, 1968.
 Stanley Fleishman and Peter Marx for Petitioner.
 John D. Maharg, County Counsel, David D. Mix, Assistant County Counsel, and Jean Louise Webster, Deputy County Counsel, for Respondent.
 No appearance for Real Party in Interest. *764
 WAPNER, J. pro tem.  [fn. *]
 The facts which are not in dispute disclose the following: On April 29, 1965, in a case entitled Cowles Magazine and Broadcasting, Inc. v. Elysium, Inc., defendant was enjoined by the superior court pending trial from utilizing the word "Look" as part of the title of its magazine "Nude Look." Defendant appealed and on November 7, 1967, the order was reversed (255 Cal.App.2d 731 [63 Cal.Rptr. 507]; hearing denied in the Supreme Court).
 In the meantime, while the appeal was pending, an order to show cause in contempt issued and an order was made holding Elysium in contempt of court for twelve separate violations of the injunction and it was ordered to pay to the clerk of the court a fine of $1,200, plus penalty assessment. Elysium paid the fine on March 1, 1966.
 Subsequent to the reversal upon appeal, Elysium made a motion in the superior court for refund upon an invalid judgment. This motion was denied and Elysium then moved for reconsideration, contending that said denial was contrary to the decision in Kreling v. Superior Court, 18 Cal.2d 884 [118 P.2d 470]. The motion for reconsideration was denied and petitioner now seeks to compel the superior court "to forthwith order the refund to petitioner of all sums paid as a fine re contempt for the alleged violation of the aforementioned void Preliminary Injunction."
 [1] The first question presented is whether petitioner is entitled to the refund.
 It is established law that no one may be punished in contempt for the disobedience of a void order. (Kreling v. Superior Court, supra, 18 Cal.2d 884, 885.) The Supreme Court, in In re Berry, 68 Cal.2d 137, 147 [65 Cal.Rptr. 273, 436 P.2d 273], states: "In this state it is clearly the law that the violation of an order in excess of the jurisdiction of the issuing court cannot produce a valid judgment of contempt [citations], and that the 'jurisdiction' in question extends beyond mere subject matter or personal jurisdiction to that concept described by us in Abeleira v. District Court of Appeal (1941) 17 Cal.2d 280, at page 291 [109 P.2d 942, 132 A.L.R. 715]. ..."
 It is important to note that the cases stating the above rule were proceedings in habeas corpus or certiorari, initiated for the purpose of annulling a contempt order, in which the court was presented with the question of the validity of the underlying *765 judgment and made its determination of that question before the execution of the contempt order.  [fn. 1] These cases hold that a person who has been held in contempt may collaterally attack the validity of the judgment and, if it is determined that the issuing court was without jurisdiction, or acted in excess of its jurisdiction, there is no basis for the order of contempt and punishment may not thereafter be imposed.
 The court, in In re Berry, supra, states (pp. 148- 149): "In this state a person affected by an injunctive order has available to him two alternative methods by which he may challenge the validity of such order on the ground that it was issued without or in excess of jurisdiction. He may consider it a more prudent course to comply with the order while seeking a judicial declaration as to its jurisdictional validity. ... On the other hand, he may conclude that the exigencies of the situation or the magnitude of the rights involved render immediate action worth the cost of peril. In the latter event, such a person, under California law, may disobey the order and raise his jurisdictional contentions when he is sought to be punished for such disobedience. If he has correctly assessed his legal position, and it is therefore finally determined that the order was issued without or in excess of jurisdiction, his violation of such void order constitutes no punishable wrong. [Citations.] If, however, the final judicial determination is otherwise he may be punished."
 Does the rule of Kreling apply where the order of contempt has become final and the judgment or order satisfied? We think that it does and so hold because to do otherwise would be manifestly unjust.
 Respondent court has raised the procedural problem that the county treasurer should have been made a party to the action because the fine was turned over to the treasurer by the clerk of the court, pursuant to court order. We find no difficulty with this point since the court having once exacted the fine must now order its return.
 The situation is much the same where one is convicted of a crime, is ordered by the court to pay a fine and does. The judgment against him is then reversed on appeal. The pertinent *766 part of section 1262, Penal Code, provides: "... If a judgment against the defendant is reversed and the case is dismissed, or if the appellate court directs a final disposition of the action in defendant's favor, and defendant has theretofore paid a fine in the case, such act shall also be deemed an order of the court that the fine, including any penalty assessment thereon, be returned to defendant."
 Let the writ of mandate issue.
 Files, P. J., and Kingsley, J., concurred.
NOTES
[fn. *]  *. Assigned by the Chairman of the Judicial Council.
[fn. 1]  1. Kreling v. Superior Court, 18 Cal.2d 884 [118 P.2d 470] (certiorari and habeas corpus); In re Berry, 68 Cal.2d 137, 147 [67 Cal.Rptr. 213, 436 P.2d 273] (habeas corpus in criminal contempt case); Brady v. Superior Court, 200 Cal.App.2d 69, 73 [19 Cal.Rptr. 242], and cases therein cited (certiorari); Grant v. Superior Court, 214 Cal.App.2d 15, 19-20 [29 Cal.Rptr. 125] (certiorari); In re DeSilva, 33 Cal.2d 76 [199 P.2d 6] (habeas corpus).
