Plaintiff Dennis Bezanson, trustee in bankruptcy of Totman’s Inc., appeals from a judgment entered in the Superior Court (Cumberland County, Lipez, J.) dismissing Bezanson’s complaint on the basis of res judicata because a M.R.Civ.P. 41(b)(1) dismissal had been entered in a previous action (Somerset County, Beaulieu, J.), brought by First National Bank of Boston against the debtor, Totman’s. Bezanson contends that the Rule 41(b)(1) dismissal violated the automatic stay provision of the United States Bankruptcy Code, 11 U.S.C.A. § 362(a) (1993), and therefore was not a valid final judgment for the purpose of res judicata. Because we agree that in this case the Rule 41(b)(1) dismissal for failure to prosecute the action against Totman’s violated the automatic stay provision, we vacate the judgment.
In 1987, the Bank filed suit in the Superior Court (Somerset County) against Totman’s Inc. for failure to repay two loans of $110,000 and $65,000, respectively. Totman’s raised an affirmative defense of wrongful payment by the Bank of the loan evidenced by the $65,000 note, asserting that it had released the loan proceeds to parties other than Tot-man’s. Before the case went to trial, Tot-man’s filed its bankruptcy petition. The court was notified of this event and no further action was taken in the ease until 1991, when pursuant to M.R.Civ.P. 41(b)(1) it was dismissed by the court for failure to prosecute.1
In 1992, Bezanson filed this action against the Bank in the Superior Court (Cumberland County), alleging that it had wrongfully paid the proceeds of the $65,000 loan to a person who was not an employee, officer, or director of Totman’s. The Bank sought dismissal of the action on the basis of res judicata. The Superior Court (Lipez, J.) granted the Bank’s motion to dismiss,2 agreeing with the Bank that the Rule 41(b)(1) dismissal was a valid final judgment that did not violate the automatic bankruptcy stay imposed by 11 U.S.C.A. § 362(a);3 that Bezanson, as trustee, was in privity with Totman’s; and that the claims pursued by Bezanson arose from the same aggregate of connected operative facts as the previously dismissed action. This appeal followed. There are no factual questions to be resolved in determining the effect of the Rule 41(b)(1) dismissal; we review the court’s decision for eiTors of law. Currier v. Cyr, 570 A.2d 1205, 1208 (Me.1990).
Res judicata bars subsequent litigation of issues if “(1) the same parties or their privies are involved in both actions; (2) a valid final judgment was entered in the prior action; and (3) the matters present for decision now were, or might have been, litigated in the prior action.” Id. (citations omitted). Thus, to create res judicata to bar the subsequent action, the Rule 41(b)(1) dismissal of the first action must have been a valid final judgment. We agree with Bezanson that a Rule 41(b)(1) dismissal for failure to prosecute an action against a debtor subject to an *77automatic stay provision of the United States Bankruptcy Code violates the automatic stay provision; is void; and does not constitute a valid final judgment for the purpose of res judicata.
Section 362 of the U.S. Bankruptcy Code grants a broad stay of all proceedings against a debtor and the property of the debtor once the debtor has filed a bankruptcy petition. 11 U.S.C.A. § 362(a)(1) (1993). The stay, applicable to the action filed by the Bank against Totman’s, prevents opposing parties from pursuing actions against the debtor and the property of the debtor until the bankruptcy proceedings have been concluded. 11 U.S.C.A. § 362(c). The purpose of the stay is to protect debtors and property of debtors from lawsuits by creditors and to give debtors an opportunity to organize their affairs. Pursiful v. Eakin, 814 F.2d 1501, 1504 (10th Cir.1987). The stay ensures that the bankruptcy procedure will provide an orderly resolution of all claims. Id.
Although courts are divided on whether the dismissal of an action against a bankrupt constitutes a “continuation ... [of a] proceeding against a debtor” barred by section 362, authority exists to support the principle that an involuntary dismissal of an action against a debtor violates such an automatic stay. Compare Independent Union of Flight Attendants v. Pan American World Airways, Inc., 966 F.2d 457, 459 (9th Cir.1992); and Seattle-First National Bank v. Westwood Lumber, Inc., 59 Wash.App. 344, 796 P.2d 790, 794-95 (1990); with Pope v. Manville Forest Products Corp., 778 F.2d 238, 239 (5th Cir.1985);4 see also Commerzanstalt v. Telewide Systems, Inc., 790 F.2d 206, 207 (2d Cir.1986) (whether action is “against the debtor” is determined by the debtor’s status at the initiation of the proceedings); Cathey v. Johns-Manville Sales Corp., 711 F.2d 60, 62 (6th Cir.1983), cert. denied, 478 U.S. 1021, 106 S.Ct. 3335, 92 L.Ed.2d 740 (1986) (debtor’s initial status as defendant satisfies “against the debtor” criteria of section 362(a)); Association of St. Croix Condominium Owners v. St. Croix Hotel Corp., 682 F.2d 446, 449 (3rd Cir.1982).
We are persuaded that, in the circumstances of this case, the involuntary dismissal under Rule 41(b)(1) for failure to prosecute violated the automatic stay provision.5 The plaintiff in such an action against a bankrupt is unable to pursue a claim because of the automatic stay’s prohibition against continuing any actions against the debtor. Such a dismissal of an action against a bankrupt defendant pursuant to Rule 41(b)(1) penalizes the plaintiff for respecting and abiding by the automatic stay. A contrary rule would burden the bankruptcy trustee with concerns about whether actions against a debtor, in which the debtor possessed counterclaims, would be dismissed, thereby eliminating certain causes of action from the bankruptcy estate.
Because the Rule 41(b)(1) dismissal violated the automatic stay provision, the dismissal was void. Except in the most unusual circumstances, e.g. In re Big Squaw Mountain Corp., 122 B.R. 831, 833 (Bankr.D.Me.1990), actions that violate the automatic stay provision are void and without effect. Maritime Electric Co., Inc. v. United Jersey Bank, 959 F.2d 1194, 1206-07 & n. 10, 1230 (3rd Cir.1991); I.C.C. v. Holmes Transp., 931 F.2d 984, 987-88 (1st Cir.1991). Thus, the Rule 41(b)(1) dismissal was not a valid final judgment to create a res judicata to bar the present action.
The entry is:
Judgment vacated. Remanded to the Superior Court for further proceedings consistent with the opinion herein.
All concurring.
. M.R.Civ.P. 41(b)(1), (3) provide in pertinent part:
RULE 41. DISMISSAL OF ACTIONS ...
(b) Involuntary Dismissal: Effect Thereof.
(1) On Court's Own Motion. The court, on its own motion, after notice to the parties, and in the absence of a showing of good cause to the contrary, shall dismiss an action for want of prosecution at any time more than two years after the last docket entry showing any action taken therein by the plaintiff other than a motion for continuance....
[[Image here]]
(3) Effect. Unless the court in its order for dismissal otherwise specifies, a dismissal under this subdivision (b) ... operates as an adjudication upon the merits.
. Res judicata is an affirmative defense and the Superior Court considered matters outside the pleadings. Therefore, although the motion was submitted and granted as a M.R.Civ.P. 12(b)(6) motion to dismiss, we treat it as one for summary judgment under M.R.Civ.P. 56. See M.R.Civ.P. 12(b) & (c).
.11 U.S.C.A. § 362(a)(1) provides in pertinent part:
(a) Except as provided in subsection (b) of this section, a petition filed under section 301, 302, or 303 of this title ... operates as a stay, applicable to all entities of—
(1) the commencement or continuation, including the issuance or employment of process, of a judicial, administrative, or other action or proceeding against the debtor that was or could have been commenced before the commencement of the case under this title....
. The Bank argues that the-Pope decision was discredited by dicta in the Fifth Circuit opinion Picco v. Global Marine Drilling Co., 900 F.2d 846, 850 n. 6 (5th Cir.1990). We are not persuaded by this argument. In a footnote, the Picco court explicitly stated that it was expressing no opinion on whether dismissing a creditor’s action against a debtor is consistent with the automatic stay. Id.
. We express no opinion today on whether a voluntary dismissal pursuant to M.R.Civ.P. 41(a) would violate the automatic stay.