
429 N.W.2d 135 (1988)
Ahmed S. AMRO, Plaintiff,
v.
IOWA DISTRICT COURT FOR STORY COUNTY, Defendant.
No. 87-1637.
Supreme Court of Iowa.
September 21, 1988.
As Corrected October 20, 1988.
*136 Timothy McCarthy II, Des Moines, for plaintiff.
Ann Beneke, Nevada, for defendant.
Considered by McGIVERIN, C.J., and HARRIS, LARSON, CARTER, and ANDREASEN, JJ.
ANDREASEN, Justice.
The district court found Ahmed S. Amro to be in contempt of the court's order requiring him to return his infant son to his ex-wife, Souad Mejdouli. The court ordered that Ahmed be incarcerated until he complied with the order. We granted certiorari in this case to determine the legality of the court's contempt order. We find the court orders to be lawful and annul the writ.

I. Background.

Ahmed S. Amro came to the United States from Jordan in 1978 and began studies at Iowa State University. Souad Mejdouli came to the United States in 1980 from Morocco. She stayed with an aunt in Des Moines for approximately two years and then returned to Morocco. During that two-year period, Souad and Ahmed did not have any significant personal contact with each other.
Approximately one week after Souad returned to Morocco, Ahmed contacted Souad's aunt and requested permission to marry Souad. Souad returned to the United States on February 24, 1983. Ahmed and Souad were married in a Muslim ceremony on that same day. This was an arranged marriage and did not involve a courtship.
Shortly after the religious ceremony, Souad learned that Ahmed was still married to another woman. The divorce proceedings between Ahmed and his first wife were still pending. Ahmed and Souad continued to live together and on December 10, 1983, their son, Mujahid, was born. Shortly after the birth of Mujahid, Ahmed's first marriage was dissolved. On January 9, 1984, Ahmed and Souad were married in a civil ceremony.
Their marriage went smoothly through 1985. At that time, Ahmed learned of his mother's death and returned to Jordan for approximately four months. After Ahmed returned, his marriage with Souad deteriorated.
On November 11, 1986, Ahmed physically assaulted Souad until she was compelled to flee and contact the police. She was taken to the hospital for treatment. The police suggested that Souad find a safe place to stay and she went to a shelter for battered women in Ames. On that same night, Ahmed was arrested and charged with assault. He was released on bail a short time later. The police told Ahmed where Mujahid was located. At that time, Ahmed found Mujahid and took custody of him. Souad has not seen Mujahid since the night of the assault. Ahmed was later convicted of assault in a jury trial.
Within seven days of the assault, on November 18, 1986, Souad filed a petition for dissolution of marriage. A hearing for temporary custody of Mujahid was set for November 21, 1986. On November 20, Ahmed moved to continue the temporary custody hearing until November 26. He asked for this extra time so that his attorney could better prepare for the hearing. Ahmed also claimed to need additional time *137 because he was unable to attend school and provide care for Mujahid. The motion stated that the continuance would not significantly prejudice Souad's interests. Ahmed made airline reservations for Mujahid to fly to Jordan on the same day that he moved to continue the temporary custody hearing. On November 22, within two weeks of the assault on Souad, Ahmed put three-year-old Mujahid on a plane bound for Jordan.
Mujahid remains in Jordan and is being cared for by Ahmed's sister. Ahmed remained in Ames and attended Iowa State University. He anticipated graduation from the College of Engineering in May of 1988.
Following a hearing, the court entered a temporary custody order on February 10, 1987, which provided that Mujahid be placed in Souad's care during the pendency of the dissolution action. Ahmed was granted reasonable rights of visitation. The court also ordered Ahmed to return Mujahid to Iowa by February 23, 1987. On March 16, Ahmed was found to be in contempt and was given until April 6, 1987, to purge himself. A consent order was entered on May 20, 1987, which allowed Ahmed to travel to Jordan to bring Mujahid back to Souad's custody by June 22, 1987. Both parties signed the consent order. Ahmed returned to Iowa on July 27, 1987, without Mujahid. Ahmed stayed with his father and Mujahid for three weeks. According to Ahmed, his father had control of Mujahid's passport and would not allow the child to be returned to the United States. Ahmed did not attempt to obtain a duplicate passport from the United States Embassy nor did he seek assistance from the Jordanian government.
A contempt hearing was held on August 13, 1987. The purpose of this hearing was to determine whether Ahmed was in contempt for failing to comply with the temporary custody order of February 10, 1987, and the consent order of May 20, 1987. The court held on September 23, 1987, that Ahmed was not in contempt and stated:
While the failure to return Mujahid may have been accomplished by design on Ahmed's part, this court cannot draw this conclusion beyond a reasonable doubt.
The application for rule to show cause was denied.
The marriage of Ahmed and Souad was dissolved on November 4, 1987. Souad was awarded sole custody of Mujahid and Ahmed was granted reasonable rights of visitation. Ahmed was to pay alimony and child support totaling $300 per month. The dissolution decree also ordered Ahmed to arrange for the return of Mujahid by December 1, 1987, and provided that Ahmed would be subject to arrest if Mujahid was not returned.
On November 19, Ahmed contacted Souad's counsel and asked for her cooperation in turning this matter over to a committee of Islamic scholars. Ahmed stated that his father would have no regard for an order from a court within the United States, but would be bound by the opinion of Islamic religious leaders. Souad's counsel declined to participate in this strategy.
On November 30 Ahmed filed a petition for writ of certiorari and obtained a stay order. We remanded this matter to the district court for a hearing to provide Ahmed with the opportunity "to advance any excuses he might have for his failure to obey the court's order for the return of his infant son."
A contempt hearing was held on January 14 and 15, 1988. Ahmed testified he had talked with his father after receiving the dissolution decree. His request that Mujahid be returned to Souad was denied. He believed his father would accept a custody decision by a panel of Islamic scholars. Mr. Jamal Said, an Islamic scholar, testified he had previously talked with Ahmed about custody of Mujahid. He believed if he wrote a letter to Ahmed's father advising him the three-year-old son should be in the custody of his mother under Islamic law, then Ahmed's father would comply. The court then continued the contempt hearing two weeks so that the letter could be sent to Ahmed's father.
Ahmed made arrangements for Mr. Said to render a written opinion to Ahmed's father. Mr. Said's letter stated in part:

*138 So I promised them [the court] to write you a letter kindly requesting from you to send the son of Ahmad [sic] Amro to America. And I assure you that the child will not be turned into his mother till she accepts to abide by the Islamic Laws regarding this matter. And the first of these laws is to withdraw this case totally from the American Judicial System, because as it is known according to the Islamic Law, it is not allowed for a Muslim to seek judgment from any Non-Islamic law in cases like this case. And after she withdraws the case, her child will be turned into her, if God wills, through her acceptance to abide by the Islamic Laws before Scholars in the Islmic [sic] Jurisprudence.
At no time was the court ever informed of Mr. Said's intentions of removing this case from the Iowa Judicial System and obtaining Souad's consent to submit to Islamic law. When Ahmed's father received this letter, he became enraged and stated he would only consider opinions of Islamic scholars from Jordan.
Following the hearing on January 29, the district court entered its February 4 remand ruling which found Ahmed to be in contempt for willful failure to comply with or to make reasonable efforts to comply with the terms of the dissolution decree. Ahmed was ordered to be incarcerated until Mujahid was returned to Story County. On February 5, Ahmed filed a petition for writ of certiorari and request for emergency stay order. We granted the emergency stay order and set the date for consideration of the petition of writ of certiorari for February 15. On March 2, a writ of certiorari was issued and the temporary stay order was nullified. Ahmed was incarcerated on March 9, 1988.

II. Issues.

Ahmed raises three issues in the petition for writ of certiorari. First, he claims that the district court erred in applying Iowa Code section 665.5 (1987) rather than Iowa Code section 598.23(1) (1987). Ahmed further challenges the findings of contempt as precluded by the doctrines of res judicata, issue preclusion, and double jeopardy. Finally, Ahmed asserts that there was insufficient evidence to establish that he was in contempt of court beyond a reasonable doubt.
These issues are properly considered in a certiorari proceeding. A writ of certiorari shall be granted when a court exceeds its proper jurisdiction or otherwise acts illegally. Iowa R.Civ.P. 306. Illegality exists when the findings of the court do not have substantial evidentiary support, see Fetters v. Degnan, 250 N.W.2d 25, 27 (Iowa 1977), or when the tribunal does not apply the proper law, see Hightower v. Peterson, 235 N.W.2d 313, 317 (Iowa 1975).

III. Religious Involvement.

There has been a great deal of evidence presented throughout this dispute concerning the Muslim religion. This evidence was introduced in an attempt to establish a role for Islamic religious leaders (Islamic scholars) in the return of Mujahid to this jurisdiction. Before we examine the legal issues presented in this case, it will be necessary to determine the proper role in our decision making process for evidence concerning the Muslim religion.
This court may not prescribe what shall be orthodox in any religion or religious culture. See West Virginia State Bd. of Educ. v. Barnette, 319 U.S. 624, 637, 63 S.Ct. 1178, 1187, 87 L.Ed. 1628, 1637 (1943); Lynch v. Uhlenhopp, 248 Iowa 68, 82-83, 78 N.W.2d 491, 500 (1956). It would be contrary to this legal standard to place this matter in the hands of Islamic scholars. While Ahmed has the ability to use his contacts in the religious community, we will not allow jurisdiction of this matter to be removed from this judicial system and given to a committee of Islamic scholars.
IV. Use of Iowa Code Section 665.5.
The district court ordered the incarceration of Ahmed under Iowa Code section 665.5 (1987). That section provides:
If the contempt consists in an omission to perform an act which is yet in the *139 power of the person to perform, the person may be imprisoned until the person performs it. In that case the act to be performed must be specified in the warrant of commitment.
Ahmed contends that Iowa Code section 598.23(1) (1987) was the applicable Code provision and it was error for the court to use section 665.5. Iowa Code section 598.23(1) provides:
If a person against whom a temporary order or final decree has been entered willfully disobeys the order or decree, the person may be cited and punished by the court for contempt and be committed to the county jail for a period of time not to exceed thirty days for each offense.
Ahmed offers Skinner v. Ruigh, 351 N.W. 2d 182, 184 (Iowa 1984), as support for his position. Skinner held that section 598.23(1) provided the penalty for contempt in dissolution cases. See id. Because this is a dissolution case, Ahmed contends that his penalty is limited to thirty days of incarceration for his act of contempt, which was removing Mujahid from this jurisdiction. In order to merits of this claim, it will be necessary to review the court's authority to incarcerate an individual found to be in contempt.
A review of Iowa Code chapter 665 reveals two distinct situations in which a court is authorized to incarcerate a contemner. Compare Iowa Code § 665.4 (1987) with Iowa Code § 665.5 (1987). Section 665.4 authorizes specific periods of incarceration as punishment for past acts of contempt. Section 665.5, on the other hand, authorizes incarceration to forcefully coerce compliance with a court order. See State v. Longstreet, 407 N.W.2d 591, 593 (Iowa 1987); Phillips v. Iowa Dist. Court, 380 N.W.2d 706, 709 (Iowa 1986); Wilson v. Fenton, 312 N.W.2d 524, 528-29 (Iowa 1981); cf. Hicks ex rel. Feiock v. Feiock, ___ U.S. ___, 108 S.Ct. 1423, 1429-30, 99 L.Ed.2d 721, 731-33 (1988); Shillitani v. United States, 384 U.S. 364, 370, 86 S.Ct. 1531, 1535-36, 16 L.Ed.2d 622, 627-28 (1966). Incarceration for a past act of contempt is punitive when there is no action available to the contemner which can effect release.
Skinner v. Ruigh, 351 N.W.2d 182, 184 (Iowa 1984), stated that chapter 665 provides the procedural framework in a dissolution case. When the provisions of chapter 665 are compared with chapter 598, it becomes apparent that the specific penalty provisions of section 665.4 have a counterpart in section 598.23. Section 665.5, which authorizes incarceration in order to compel performance, does not have a counterpart in chapter 598. Skinner involved a past act of contempt and did not limit the ability of the court in dissolution cases to use incarceration as a method to compel an unwilling individual to comply with a court order. To adopt Ahmed's interpretation of Skinner would relegate the court to the position of a helpless bystander in many extreme instances of contempt. Unless the court is allowed to enforce a custody award through the use of its contempt powers, a custody award could be meaningless and the child's best interest would be unprotected.
Our interpretation is supported by previous Iowa cases. McNabb v. Osmundson, 315 N.W.2d 9, 14-15 (Iowa 1982), stated that Iowa Code section 598.23 is intended to be primarily punitive in nature, and is only indirectly coercive. See also Iowa Code § 598.22 (1987) ("the court may act pursuant to section 598.23 regardless of whether the amounts in default are paid prior to the contempt hearing."); Ogden v. Iowa Dist. Court, 309 N.W.2d 401 (Iowa 1981) (per curiam). Because the court's contempt order expressly provided for Ahmed's release upon compliance, and did not impose a fine or fixed period of incarceration, it was coercive, not punitive in nature. The provisions of section 598.23 were not applicable.
V. Issue Preclusion, Res Judicata, and Double Jeopardy.
Ahmed contends that the contempt order of February 1988 is barred by the doctrines of issue preclusion and res judicata. He also asserts that this hearing constitutes double jeopardy. The basis of each of *140 these challenges is a claim that the contempt hearing in August of 1987 addressed the identical issues as the hearing conducted in February 1988.
For issue preclusion or res judicata to apply, the issue that is litigated must be identical to the issue raised in the previous action. See Hunter v. City of Des Moines, 300 N.W.2d 121, 123 (Iowa 1981); In re Marriage of Kurtz, 199 N.W.2d 312, 315 (Iowa 1972). Even assuming former jeopardy principles apply, they were not violated in this case. See State v. Stewart, 223 N.W.2d 250, 251 (Iowa 1974), cert. denied, 423 U.S. 902, 96 S.Ct. 205, 46 L.Ed.2d 134 (1975); see also United States v. Halbrook, 36 F.Supp. 345, 347 (E.D.Mo.1941) ("Before a defendant may successfully interpose a plea of double jeopardy, it is necessary that there be an identity of offenses.").
The issue addressed in January 1988 was not identical to the issue addressed in August of 1987. In August, the issue was whether Ahmed was in contempt for failing to comply with the temporary custody order of February 10, 1987, and the consent order of May 20, 1987. The January 1988 contempt hearing addressed Ahmed's failure to comply with or to make reasonable efforts to comply with the dissolution decree of November 4, 1987. The finding of contempt in February 1988 dealt with a court order and many facts that were not in existence in August 1987. Because the hearings involved facts and issues that were not identical, issue preclusion, res judicata, and double jeopardy do not prevent the enforcement of the February 1988 order.
This holding does not conflict with Clark v. Glanton, 370 N.W.2d 606, 608 (Iowa App.1985). In Clark, the court of appeals applied issue preclusion to a finding of contempt. The court of appeals stated that "time was not an issue in either contempt action." Id. Here, the passage of time and the events that occurred after the final decree was entered are at the center of the controversy.
VI. Sufficiency of Evidence to Establish Contempt.
An action for contempt of court is treated in the nature of a criminal proceeding. See Phillips v. Iowa Dist. Court, 380 N.W.2d 706, 708-09 (Iowa 1986). No person may be punished for contempt unless the allegedly contumacious actions have been established by proof beyond a reasonable doubt. See id. Contempt is sufficiently shown if some of the default was willful. See Skinner v. Ruigh, 351 N.W.2d 182, 186 (Iowa 1984). In this context, a finding of willful disobedience
requires evidence of conduct that is intentional and deliberate with a bad or evil purpose, or wanton and in disregard of the rights of others, or contrary to a known duty, or unauthorized, coupled with an unconcern whether the contemner had the right or not.
Lutz v. Darbyshire, 297 N.W.2d 349, 353 (Iowa 1980). Furthermore, because certiorari is an action at law, our review is at law and not de novo. See Johnson v. Iowa Dist. Court, 385 N.W.2d 562, 564 (Iowa 1986).
A review of the record demonstrates that the trial court's finding of willful contempt is supported by substantial evidence. Since Ahmed's assault on Souad and his initial manipulation of the courts in order to remove Mujahid to Jordan, Ahmed's attempts to return Mujahid have been half-hearted. This attitude is demonstrated by his failure to contact the Jordanian government or attempt to obtain a duplicate passport.
The credibility of Ahmed's testimony is further weakened by a consistent failure to be forthright. For example, Ahmed denied assaulting Souad, even though he had been convicted of the assault. Ahmed has also offered several conflicting versions of his reasons for sending Mujahid to Jordan. He was also less than truthful when he explained the proposed letter of Mr. Jamal Said. Ahmed did not mention that a condition of Mujahid's return would be the withdrawal of this case from the American judicial system or Souad's acceptance of Islamic law in settling this matter.
*141 On several occasions the district court made very clear reference to its belief that Ahmed was lying. In the order dated February 4, 1987, the district court stated:
Mr. Amro was able to take Mujahid to Jordan because he lied to the Court as to what his true intentions were when he falsely promised that he would take no action which was prejudicial to the rights [of] Souad. Subsequently he has given three differing versions of his intent, none of which included an admission that he lied. He has an arrangement in Jordan where he can be with his son any time he chooses to be. His son is in the care of his sister and his wife to be. He would suggest that his 89-year old father is so powerful and sophisticated that he requires opinions from committees of religious scholars before he takes action. The court does not believe that aspect of his testimony. This is a situation that Mr. Amro has engineered to try to justify the situation that he intentionally created and which has continued up to this date. He fails to even make an effort to enlist the aid of the Jordanian authorities who could effect a change if his version of the facts were correct. Instead Mr. Amro attempts to get the Court and the petitioner to agree that the custody issue should be redetermined by Islamic scholars and then be enforced if his aged father agrees to comply. This is a sham and subterfuge which Mr. Amro engages in for the purpose of trying to get the Court to overlook his contemptuous, willful non-compliance with its order.
We agree with the district court. The contumacious action by Ahmed has been established beyond a reasonable doubt.

VII. Period of Incarceration and Disposition.

After establishing that Ahmed is in contempt, we must consider whether it is appropriate for Ahmed to be incarcerated. As discussed earlier, Ahmed's sentence is designed to coerce him into effecting the return of Mujahid. Ahmed will be released once he has purged himself of contempt. This was not an unconditional sentence for a definite period of time. When incarceration is used to coerce, we do not look to the statutory limits of Iowa Code sections 598.23 or 665.4. Instead, we consider whether the contemner carries "the keys of their prison in their own pockets." Shillitani v. United States, 384 U.S. 364, 368, 86 S.Ct. 1531, 1534, 16 L.Ed.2d 622, 626 (1966); see also McNabb v. Osmundson, 315 N.W.2d 9, 15 (1982). If Ahmed is without any opportunity to take reasonable actions to obtain his release, then his incarceration until he has complied, is inappropriate. When the incarceration is used to coerce, the contemner has the burden of showing the inability to comply with the court order. See Lamb v. Eads, 346 N.W.2d 830, 832 (Iowa 1984) ("The contemner then has the burden of showing he could not perform the duty, if he relies on that ground."); see also Wilson v. Fenton, 312 N.W.2d 524, 527 (Iowa 1981) ("the alleged contemnor has the burden of proof on a defense of inability to comply"); Foust v. Denato, 175 N.W.2d 403, 405 (Iowa 1970) ("when the evidence clearly shows the order of court has been disobeyed, a party who seeks to purge himself of contempt by showing his inability to comply with the order of court has the burden to prove it").
The evidence reflects several courses of action that Ahmed has not fully attempted, such as obtaining a duplicate passport and attempting to work with the Jordanian government. At this point, Ahmed has not made every reasonable effort at his disposal to return Mujahid. We recognize the possibility that Ahmed may eventually exhaust his courses of action and remain unsuccessful in returning Mujahid to the United States. At this time, however, we are not faced with that question. That question will not arise until Ahmed has exhausted all reasonable courses of action in his effort to return Mujahid to his mother. We are satisfied that there are reasonable courses of action available to Ahmed to comply with the court's order. The district court did not exceed its proper jurisdiction or otherwise act illegally.
WRIT ANNULLED.
