
244 B.R. 820 (1999)
In re Albert HAKIM, Debtor.
Bankruptcy No. 96-53628-MM.
United States Bankruptcy Court, N.D. California.
August 12, 1999.

MEMORANDUM DECISION AND ORDER THEREON
MARILYN MORGAN, Bankruptcy Judge.

I. Statement of Facts
The origins of the matter pending before the Court are rooted in what became commonly known as the Iran-Contra Affair. From early 1984 to late 1986, the debtor, Albert Hakim, in association with top United States military officials, provided support to Nicaraguan Contras with monies generated by arms sales to Iran. These secret activities were exposed by the press in November of 1986. For over a dozen years, Hakim litigated ownership of the remaining funds with the United States government. In dispute was $7,814,899 plus accrued interest deposited in Swiss bank accounts originally controlled by Major General Secord and Hakim. In November 1989, Hakim entered into a civil agreement in which the United States withdrew any claim to $1.7 million. The agreement, however, did not settle any alleged tax liabilities of Hakim. Moreover, the agreement was later renounced by both Hakim and the United States.
In its continuing efforts to obtain the funds, the United States brought a civil suit in Switzerland naming Hakim, Secord, and Lieutenant Colonel North as defendants. In June 1993, the Geneval Cantonal Court froze the funds for the duration of the case, and on September 9, 1998, the Swiss court issued its decision in favor of the United States, with the exception of the $1.7 million set aside to Hakim in the November settlement agreement. There are no appeals pending.
*821 Meanwhile, in September 1992, the tax court issued notices of deficiency to Hakim for $1,031,242 in 1985 and $1,296,093 in 1986. Hakim petitioned the tax court with respect to the alleged deficiencies in December 1992. In May 1996, Hakim filed a voluntary Chapter 11 petition. In the four-year interim between the issuance of the notices of deficiency and the filing of the bankruptcy case, the tax court continued the case several times on account of the Swiss litigation because a determination on ownership of the funds would have a direct bearing on the tax case.
In June 1998, prior to plan confirmation, Hakim's bankruptcy case was dismissed for lack of prosecution. A month later, the tax court lifted its order of stay. In October 1998, at the request of creditors of the estate, the Bankruptcy Court vacated the order of dismissal to allow the estate to pursue the Swiss funds set aside to Hakim, and converted the case to Chapter 7, appointing a trustee.

II. Contentions of the Parties
This motion was brought in order to determine the status of the automatic stay. At the hearing on the motion for relief, the parties limited argument to whether the automatic stay applies in cases where an order of dismissal is vacated. The parties reserved the issue of whether cause exists to grant relief from stay for future determination. The United States Attorney, representing the Internal Revenue Service, claims that the stay is not automatically reinstated when a case is reopened, citing the tax court case of Guerra v. Commissioner, 110 T.C. 271, 1998 WL 161009 (1998).
Taggert & Hawkins, a creditor, and the Chapter 7 trustee argue that the automatic stay was reinstated when the order of dismissal was vacated.

III. Discussion
The automatic stay prevents the commencement or continuation of a proceeding against the debtor in any court, including the tax court. The Bankruptcy Code provides that "the stay continues until the earliest of (A) the time the case is closed; (B) the time the case is dismissed; or (C) . . . the time a discharge is granted or denied." 11 U.S.C. § 362(c). The instant case deals specifically with a vacated order of dismissal. There appears to be no Ninth Circuit Court of Appeals or Bankruptcy Appellate Panel decision addressing the issue. However, all but one of the cases cited by the parties can be reconciled by considering the procedural posture of the cases at the time of dismissal.
As a general rule, whether the automatic stay is reinstated depends on whether the stay was in effect on dismissal of the case. In turn, the question of whether the stay was in effect depends on whether the stay terminated by operation of law.
In the Chapter 13 context, where a plan has been confirmed and the case is subsequently dismissed, the automatic stay is reinstated upon vacating the order of dismissal in order to afford the debtor the opportunity to complete plan payments and receive a discharge. Cases generally hold that an order vacating an order of dismissal of a Chapter 13 case restores the stay as if it had not been terminated at all pursuant to § 362(c). See Diviney v. NationsBank of Texas (In re Diviney), 225 B.R. 762 (10th Cir. BAP 1998). See also In re Nail, 195 B.R. 922, 931-32 (Bankr. N.D.Ala.1996) (holding that in a Chapter 13 case, the stay is automatically reimposed when the order of dismissal is vacated); In re Bennett, 135 B.R. 72 (Bankr. S.D.Ohio 1992) (assuming without discussion that the automatic stay is reimposed when an order of dismissal is vacated); In re Bellman Farms, 86 B.R. 1016, 1020 (Bankr.D.S.D.1988) (assuming without discussion that the automatic stay is reimposed when a dismissal order is vacated). But see Guerra v. Commissioner, 110 T.C. 271, 1998 WL 161009 (1998).
In Diviney, NationsBank repossessed a car after an order vacated dismissal of the *822 case. The debtors filed an adversary motion alleging that the bank violated the automatic stay. Citing two tax court cases, the bank argued in part that the stay was irrevocably terminated when the case was dismissed. The Tenth Circuit Bankruptcy Appellate Panel rejected the argument holding that when an order of dismissal is vacated, all of its effects are vacated, including the termination of the automatic stay. The court noted that without the protection afforded by the automatic stay, the debtor's ability to comply with the confirmed plan would be in jeopardy since creditors would be free to seize their collateral as well as non-exempt property. In re Diviney, 225 B.R. at 770.
A different result is reached in cases under Chapter 7 where the debtor has received a discharge. In a Chapter 7 case, the automatic stay is not reinstated. See Allison v. Commissioner, 97 T.C. 544, 1991 WL 238314 (1991); In re Trevino, 78 B.R. 29 (Bankr.M.D.Pa.1987). In Trevino, the Chapter 7 debtor received his discharge and subsequently the Chapter 7 trustee moved to reopen the case to pursue litigation against the bank. Recognizing the policy behind the automatic stay, the court reasoned that the automatic stay was not reinstated when the case was reopened because the automatic stay was not in effect after the final discharge order was entered. In re Trevino, 78 B.R. at 37-38.
In the Chapter 11 context, whether the automatic stay terminates upon operation of law depends on whether or not a plan has been confirmed. This is because the automatic stay is essential to a debtor's ability to reorganize. A Chapter 11 debtor with a confirmed plan no longer needs the protection afforded by the automatic stay since the plan binds creditors. See e.g. Moody v. Commissioner, 95 T.C. 655, 660, 1990 WL 210334 (1990) (noting that the bankruptcy court's order confirming a plan of reorganization lifted the automatic stay); Zimmerman v. Commissioner, 105 T.C. 220, 1995 WL 542406 (1995) (holding that automatic stay continued until the date of discharge).
The United States, citing Guerra v. Commissioner, 110 T.C. 271, 1998 WL 161009 (1998), argues that the stay is not automatically reinstated when a case is reopened. The tax court in Guerra, relying on authorities in the Chapter 7 context, held that the automatic stay terminated on dismissal. What the Guerra court failed to recognize is that the effect of a dismissal in a Chapter 7 case is distinguishable from that in a Chapter 13 case. For this reason, the Guerra decision is wrongly decided.
Hakim's Chapter 11 case was dismissed and the order of dismissal was vacated before a plan of reorganization was confirmed. In vacating the dismissal order, the Court returned the case to the status quo before entry of the order of dismissal. The automatic stay was in place at the time of dismissal, and should remain in effect. To fail to restore the stay would undermine the orderly administration of the case, leaving the estate without a mechanism to control creditor conduct. Because the automatic stay was reinstated, the United States remains subject to the stay until it is terminated by court order or operation of law.
The parties may reset for hearing that portion of the motion seeking and opposing relief from the automatic stay. Good cause appearing, IT IS SO ORDERED.
