                    FOR PUBLICATION
 UNITED STATES COURT OF APPEALS
      FOR THE NINTH CIRCUIT

In re: OMER L. RAINS,                   
OMER L. RAINS,                                No. 03-16538
                           Appellant,          D.C. No.
                v.                          CV-03-00388-GEB
KENNY   W. FLINN,
                            Appellee.
                                        

In re: D.W.   AND   O.L. RAINS,         
OMER L. RAINS,
                           Appellant,
                                              No. 04-15743
                v.
KENNY   W. FLINN,                              D.C. No.
                                            CV-03-01524-GEB
                            Appellee,
                                               OPINION
                 and
OFFICE OF THE UNITED STATES
TRUSTEE,
                          Trustee.
                                        
        Appeal from the United States District Court
           for the Eastern District of California
        Garland E. Burrell, District Judge, Presiding

                   Argued and Submitted
        February 8, 2005—San Francisco, California

                     Filed November 8, 2005

                              15207
15208                  IN RE: RAINS
  Before: J. Clifford Wallace, Johnnie B. Rawlinson, and
               Jay S. Bybee, Circuit Judges.

              Opinion by Judge Rawlinson
                      IN RE: RAINS                15211


                      COUNSEL

George C. Hollister, Sacramento, California, for debtor-
appellant Omer L. Rains.
15212                    IN RE: RAINS
Gregory J. Hughes, Roseville, California, for trustee-appellee
Kenny W. Flinn.


                         OPINION

RAWLINSON, Circuit Judge:

   These consolidated appeals arise from the bankruptcy
court’s approval of, and subsequent enforcement of, a settle-
ment agreement resolving adversary proceedings brought by
the trustee-appellee and a creditor against the debtor-
appellant. Because we conclude that the settlement agreement
was valid, and that enforcement of the agreement was proper,
we affirm the district court’s decision upholding the approval
of the settlement agreement. Although the district court erred
in ruling that the appeal of the judgment enforcing the settle-
ment was untimely, we affirm the entry of judgment in favor
of the trustee.

I.    BACKGROUND

     A.   The Settlement Agreement

   Omer L. Rains is an attorney and a debtor in bankruptcy.
Kenny W. Flinn is the bankruptcy trustee. In September 2002,
the bankruptcy court appointed a mediator in connection with
adversary proceedings involving Rains, Flinn, and a creditor.
A settlement conference was held on September 23, 2002, and
after a full day of negotiations, the parties reached a settle-
ment agreement (settlement or agreement). The agreement
was reduced to writing and the parties (including Rains) and
their attorneys signed it.

   Pursuant to the terms of the settlement, Rains and his wife,
also a debtor, agreed to pay the trustee $250,000 by March 31,
2003. Upon timely payment, the trustee and the creditor
                          IN RE: RAINS                       15213
agreed to dismiss the adversary proceedings and withdraw
their objections to claimed exemptions from the bankruptcy
estate. Among the exemptions claimed by Rains was his inter-
est in a retirement plan sponsored by the American Bar Asso-
ciation (retirement plan). The agreement alternatively
provided that:

    [i]n the event that payment is not timely made by the
    defendants, judgment shall be entered denying the
    debtors’ discharge and an order shall be entered
    denying the debtors’ exemption claim to the ABA
    pension plan up to the amount of $250,000 unless
    before the due date for payment the debtors have
    posted an irrevocable standby letter of credit . . . (or
    other instrument or collateral acceptable to the
    trustee and to [the creditor]) to support the $250,000
    payment.

  B.   The First Appeal         (Court    Approval      of     the
       Settlement)

  Immediately following the conclusion of the mediation,
Rains drove himself to a hospital emergency room where he
was admitted and diagnosed with a ruptured cerebral aneu-
rysm, sub-arachnoid hemorrhage, and stroke. Rains under-
went surgery the next day and was placed in the intensive care
unit for approximately one month prior to his eventual dis-
charge from the hospital. Rains claims to have no recollection
of the events preceding his hospitalization.

   Sometime after Rains underwent medical treatment, coun-
sel for Rains informed the trustee’s attorney that Rains did not
intend to comply with the settlement agreement. This devel-
opment prompted the trustee to file with the bankruptcy court
a Motion for Court Approval of Settlement; for Enforcement
of Settlement; and for Entry of Judgment Thereon (motion to
approve). In support of the motion, the trustee submitted a
declaration in which he stated that he had personally observed
15214                     IN RE: RAINS
Rains at the settlement conference. According to the trustee,
“Rains evinced a clear understanding of what was transpiring,
the issues inherent in the settlement process, and the terms of
the agreement as it evolved.”

   Rains opposed the motion to approve and sought rescission
of the agreement on the ground that he was not mentally com-
petent to enter into a contract at the time the agreement was
negotiated and signed. In his opposition, Rains expressly
“consent[ed] to the Court’s resolution of any disputed mate-
rial fact issues pursuant to Federal Rule of Evidence 43(e) as
made applicable by Federal Rule of Bankruptcy Procedure
9017.” Rains submitted several declarations in support of his
contention that he was mentally incompetent, including those
of a neurologist who treated him for the aneurysm and a clini-
cal psychologist who provided follow-up care. The neurolo-
gist opined that “Mr. Rains would have been without the
mental capacity to engage in business affairs on September
23, the date of his hospital admission, and for a number of
days on each side of that date.” The psychologist concurred,
stating that at the time Rains negotiated the settlement, he
“would not have had his normal mental capacity and would
have been incapable of conducting business affairs with com-
petence.”

   The trustee filed a reply controverting Rains’s contention
that he was mentally incompetent during the settlement con-
ference. Accompanying the reply was a declaration from
Gregory J. Hughes, counsel for the trustee. Hughes stated that
he had a chance to observe Rains at the settlement conference.
According to Hughes, Rains participated actively in the nego-
tiations, arguing over the due date for a cash payment and
over the use of funds in his retirement plan as security for the
payment. After the settlement was reduced to writing, Rains
reviewed the document carefully and asked his attorney ques-
tions about it. Hughes’s overall impression also was that “Mr.
Rains evinced a clear understanding of what was transpiring,
the issues inherent in the settlement process, and the terms of
                          IN RE: RAINS                    15215
the settlement as it evolved.” Rains’s creditor and her attorney
submitted similar declarations.

   The bankruptcy court heard oral argument on the motion to
approve the settlement agreement, but did not hold a separate
evidentiary hearing. After taking the matter under advisement,
the bankruptcy court issued oral findings of fact and conclu-
sions of law and announced that it was not “persuaded that
[Rains] lacked the capacity to enter into an agreement.” The
court ruled from the bench, granting the motion to approve.
Its decision was memorialized in a minute order entered on
February 20, 2003 (settlement order).

   Rains filed a notice of appeal from the order approving the
settlement agreement, and elected to have the appeal heard by
the district court. The district court affirmed the bankruptcy
court’s decision, and Rains appealed.

  C.   The Second Appeal (Court Enforcement of the
       Settlement Agreement)

   While the first appeal was pending before the district court,
Flinn filed an ex parte application for entry of judgment pur-
suant to the terms of the settlement agreement. This request
was prompted by Rains’s failure to pay $250,000 by the
March 31, 2003 due date. The bankruptcy court entered judg-
ment in favor of Flinn, ruling that Rains’s “claim of exemp-
tion against the ABA Retirement Plan is hereby denied up to
the sum of $250,000.00, and $250,000.00 of the funds in that
Retirement Plan is hereby held to be property of the Chapter
7 estate.” The judgment further required Rains to “forthwith
withdraw the sum of $250,000.00 from the ABA Retirement
Plan, and . . . pay said amount to the Trustee immediately
upon receipt.”

   Rains filed a Motion to Alter or Amend Judgment (motion
to amend judgment) in the bankruptcy court, contending that
the court exceeded its jurisdiction when it declared that
15216                           IN RE: RAINS
$250,000 of the ABA retirement plan was part of the bank-
ruptcy estate and ordered Rains to pay that amount from the
retirement plan to the bankruptcy trustee. The bankruptcy
court heard oral argument and denied the motion. Although
the first appeal was pending in district court, neither party
notified the district court of these later developments in bank-
ruptcy court. Rains subsequently appealed the bankruptcy
court’s order denying the motion to amend judgment and its
judgment enforcing the settlement agreement. Once again,
Rains elected to have the appeal heard by the district court.

   The district court’s rationale for the disposition of this sec-
ond appeal rested on a complicated interplay of procedural
rules involving both the first and second appeals. Finding that
the second appeal also challenged the order approving the set-
tlement agreement, rather than merely challenging its enforce-
ment, the district court altered the analysis of its prior ruling
and determined that the original order approving the settle-
ment agreement was not final after all.1 The court reasoned
that because the first appeal was taken from what proved to
be an interlocutory order, it was premature, and should be
treated as having been filed on the day the final judgment was
entered, pursuant to Fed. R. Bankr. P. 8002(a).2 As the prema-
  1
     The district court explained that in its prior ruling, it considered the
order approving the settlement agreement as final under our “pragmatic
approach to finality in bankruptcy cases.” See Alexander v. Compton (In
re Bonham), 229 F.3d 750, 761-62 (9th Cir. 2000) (describing bankruptcy
court order as final where it “resolve[d] and seriously affect[ed] substan-
tive rights” and “finally determine[d] the discrete issue to which it [was]
addressed”) (citations omitted). The district court’s ruling can be traced to
the fact that the parties failed to notify the district court of the subsequent
proceedings in bankruptcy court while the appeal was pending in district
court.
   2
     The first notice of appeal (from the order approving the settlement
agreement) was filed on February 27, 2003. Judgment enforcing the settle-
ment agreement was entered by the bankruptcy court on May 23, 2003.
The motion to alter or amend judgment was filed on June 2, 2003 and
denied on July 7, 2003. The second notice of appeal (from the denial of
the motion to alter or amend judgment and from the judgment enforcing
the settlement agreement) was filed on July 17, 2003.
                              IN RE: RAINS                         15217
ture but subsequently cured notice of appeal was deemed filed
on the date judgment was entered (May 23, 2003), but before
the motion to amend judgment was filed (June 2, 2003), the
district court concluded that the bankruptcy court lacked juris-
diction over the motion to amend judgment because of the
appeal then pending in district court. See Dressler v. The See-
ley Co. (In re Silberkraus), 336 F.3d 864, 869 (9th Cir. 2003)
(observing that “the filing of a notice of appeal generally
divests the trial court of jurisdiction.”) (citations omitted). The
district court then reasoned that because the bankruptcy court
lacked jurisdiction over the motion to amend judgment, the
filing of the motion did not toll the time allowed for appealing
the judgment to the district court. Accordingly, the district
court dismissed the second appeal for lack of jurisdiction on
the basis that Rains’s notice of appeal filed July 17, 2003
seeking review of the judgment that enforced the settlement
agreement and denied the motion to amend judgment was
untimely vis-à-vis the May 23, 2003, judgment. However, the
district court’s rationale does not address the fact that the
notice of appeal filed on February 27, 2003, if premature
because it was interlocutory, would be deemed filed on May
23, 2003, the date of final judgment. See Arrowhead Estates
Development Co. v. United States Trustee (In re Arrowhead
Estates Development Co.), 42 F.3d 1306, 1310 (9th Cir.
1995), as amended; Fed. R. Bankr. P. 8002(a). The interlocu-
tory and final orders would then merge into one judgment for
the purpose of appeal. See American Ironworks & Erectors
Inc. v. N. Amer. Constr. Corp., 248 F.3d 892, 897-98 (9th Cir.
2001). Accordingly, the notice of appeal would be timely with
respect to the February 20, 2003 order approving the settle-
ment agreement, as well as the May 23, 2003 order enforcing
the settlement agreement.3
  3
    Under this analysis the motion to alter or amend judgment was outside
the scope of appeal in the district court. However, because the motion to
alter or amend judgment mirrored Rains’s arguments on the merits, the
district court’s decision to exclude the motion to alter or amend judgment
from appellate consideration does not affect the outcome of this appeal.
15218                       IN RE: RAINS
II.    GENERAL STANDARDS OF REVIEW

   “We review de novo a district court’s decision on appeal
from a bankruptcy court, and afford no deference to the prior
decision of the district court. We also review de novo the
bankruptcy court’s conclusions of law, including its interpre-
tation of the Bankruptcy Code. We review the bankruptcy
court’s factual findings for clear error. Under this standard,
we accept findings of fact made by the bankruptcy court
unless these findings leave the definite and firm conviction
that a mistake has been committed by the bankruptcy judge.”
Latman v. Burdette, 366 F.3d 774, 781 (9th Cir. 2004) (cita-
tions omitted).

III.    DISCUSSION

  A.        The First Appeal (Appeal from the Order
            Approving the Settlement Agreement)

       1.    Jurisdiction

   The trustee contends that we lack jurisdiction over Rains’s
appeal from the order approving the settlement agreement
because the order was interlocutory. Thus, as a threshold mat-
ter, we must determine whether we have jurisdiction over the
first appeal. See Jeff D. v. Kempthorne, 365 F.3d 844, 849-50
(9th Cir. 2004). We conclude that we do.

   Jurisdiction over an appeal from an order of a bankruptcy
court is governed by 28 U.S.C. § 158. That section vests juris-
diction in the district court to hear appeals from “final judg-
ments, orders, and decrees . . . and, with leave of the court,
from interlocutory orders and decrees, of bankruptcy judges.”
Id. § 158(a). The courts of appeals are granted jurisdiction
over “appeals from all final decisions, judgments, orders, and
decrees entered” by the district courts in their bankruptcy
appellate capacity. Id. § 158(d) (emphasis added). “Whether
a bankruptcy court’s decision is final . . . is a question of law
                          IN RE: RAINS                     15219
reviewed de novo.” Silver Sage Partners, Ltd. v. City of
Desert Hot Springs (In re City of Desert Hot Springs) 339
F.3d 782, 787 (9th Cir. 2003) (citation omitted).

   [1] Although district courts have discretion to hear interloc-
utory appeals from bankruptcy courts, § 158(d) does not grant
courts of appeals similar discretion to review interlocutory
decisions. “The courts of appeals do not have jurisdiction to
hear interlocutory appeals in bankruptcy cases.” Silver Sage,
339 F.3d at 787. “Under 28 U.S.C. § 158(d), appellate juris-
diction exists when the bankruptcy court order and the deci-
sion of the district court acting in its bankruptcy appellate
capacity are both final orders.” In re Bonham, 229 F.3d at 761
(citations and footnote omitted). However, even if the order
approving the settlement agreement were interlocutory, we
are not necessarily deprived of jurisdiction, because “subse-
quent events can validate a prematurely filed appeal.”
Ethridge v. Harbor House Restaurant, 861 F.2d 1389, 1402
(9th Cir. 1988) (citation omitted). “[T]he rule in this circuit
[is] that once a final judgment is entered, an appeal from an
order that otherwise would have been interlocutory is then
appealable.” Eastport Assocs. v. City of Los Angeles (In re
Eastport Assocs.), 935 F.2d 1071, 1075 (9th Cir. 1991); see
also Special Investments Inc. v. Aero Air Inc., 360 F.3d 989,
993 (9th Cir. 2004) (“a prematurely filed notice of appeal can
be cured if the rest of the claims are disposed of in a subse-
quent final decision terminating the litigation”) (citation omit-
ted). Whatever prematurity existed in Rains’s appeal from the
order approving the settlement agreement was cured by the
subsequent entry of a final judgment. See In re Eastport
Assocs., 935 F.2d at 1075. We therefore have jurisdiction to
consider Rains’s first appeal.

    2.   Rains’s Mental Competency to Enter Into the
         Settlement Agreement

   [2] The parties agree that California state law applies to the
issue of the validity of the settlement. See Houston v. Holder
15220                     IN RE: RAINS
(In re Omni Video, Inc.), 60 F.3d 230, 232 (5th Cir. 1995)
(holding that the validity of settlements in bankruptcy cases
is best resolved by reference to state contracts law); see also
Raleigh v. Illinois Dep’t of Revenue, 530 U.S. 15, 20 (2000)
(observing the “basic federal rule . . . that state law governs
the substance of claims [in bankruptcy cases]”) (citation and
internal quotation marks omitted). California law provides
that “[a] conveyance or other contract of a person of unsound
mind, but not entirely without understanding, made before the
incapacity of the person has been judicially determined, is
subject to rescission . . . .” Cal. Civ. Code § 39(a). Pursuant
to this statute, “a party is entitled to rescission of a contract
if, when he entered into the contract, he was not mentally
competent to deal with the subject before him with a full
understanding of his rights . . .” Smalley v. Baker, 262 Cal.
App. 2d 824, 832 (1968), overruled on other grounds by
Weiner v. Fleischman, 54 Cal. 3d 476 (1991). “[T]he test . . .
in each instance [ ] [is] whether he understood the nature, pur-
pose and effect of what he did.” Smalley, 262 Cal. App. 2d at
832 (citations omitted).

   [3] Rains argues that the bankruptcy court clearly erred in
finding him mentally competent to enter into the settlement
agreement. However, the record contained sufficient evidence
to support a finding that Rains understood the nature, purpose
and effect of his actions when he agreed to settle with the
trustee and the creditor. Witnesses who personally observed
Rains during the negotiations reported that Rains participated
actively and appeared to have a full understanding of what
was transpiring and of the terms of the settlement. Rains
argued over certain terms and suggested alternatives to those
he disliked. After the settlement was negotiated, Rains
reviewed the written agreement and asked his attorney ques-
tions about it.

   [4] Rains does not seriously dispute the veracity of the wit-
ness statements offered by the trustee. Rather, he relies heav-
ily on the opinions of his treating physician and psychologist
                               IN RE: RAINS                          15221
that a person with his diagnosis would not have had the men-
tal capacity to conduct business affairs at the time of the
negotiations. However, the weight to be given expert medical
testimony is within the discretion of the trier of fact. Wong Ho
v. Dulles, 261 F.2d 456, 460 (9th Cir. 1958). The bankruptcy
court was not bound to follow these expert opinions. See
United States v. Honolulu Plantation Co., 182 F.2d 172, 178
(9th Cir. 1950). In the face of conflicting testimony, the bank-
ruptcy court did not clearly err in discounting the theoretical
speculation of Rains’s experts, or in finding that Rains was
mentally competent to enter into the settlement agreement.
See Prescod v. AMR, Inc., 383 F.3d 861, 869 (9th Cir. 2004)
(observing that the trier of fact is in the best position to
resolve conflicts in the evidence).

      3.   Denial of Rains’s Request to Supplement the
           Evidentiary Record

   Rains contends that the bankruptcy court committed revers-
ible error by “denying [his] verbal request at the preliminary
hearing . . . to supplement the evidentiary record to challenge
[Flinn’s] lay witness declaration testimony submitted in sup-
port of [Flinn’s] [reply].” He further asserts that the bank-
ruptcy court’s “decision to deny Rains’ request to file
evidentiary objections” to the reply declarations violated his
procedural due process rights.

   [5] Rains’s arguments are not persuasive for five reasons.
First, Rains waived his due process claim by failing to raise
it properly before either the bankruptcy court or the district
court. In general, this Court does not consider an issue raised
for the first time on appeal. Cold Mountain v. Garber, 375
F.3d 884, 891 (9th Cir. 2004).4 Rains did not raise the issue
  4
    There are three recognized exceptions pursuant to which we may exer-
cise discretion to hear previously unconsidered claims: “(1) In the ‘excep-
tional’ case in which review is necessary to prevent a miscarriage of
justice or to preserve the integrity of the judicial process, (2) when a new
15222                          IN RE: RAINS
at all before the bankruptcy court. He did not raise it before
the district court until he filed his reply brief. The district
court did not address the due process claim in its subsequent
order, undoubtedly relying on the principle that “issues cannot
be raised for the first time in a reply brief.” Coleman v.
Quaker Oats Co., 232 F.3d 1271, 1289 n.4 (9th Cir. 2000)
(citation omitted).

   [6] Second, Rains never articulated his requests with suffi-
cient clarity to preserve the alleged error for review. For an
argument to be considered on appeal, it generally “must be
raised sufficiently for the trial court to rule on it.” Broad v.
Sealaska Corp., 85 F.3d 422, 430 (9th Cir. 1996) (citation
omitted). The closest Rains’s counsel came to asking for
expansion of the record was to complain that “[w]e get no
chance to take a whack at the reply declarations. I mean, are
you going to do that sua sponte, or should I file something or
—.” This vague statement did not adequately apprise the
bankruptcy court of the nature of Rains’s request such that the
court had an opportunity to rule on it.

   [7] Third, nothing prevented Rains from orally objecting to
the reply declarations at the hearing on the motion to approve.
However, he failed to so. At one point, Rains’s counsel stated
that “several of the declarations are replete with hearsay state-
ments which are completely inadmissible,” but he never artic-
ulated any clear objections to specific statements made in the
declarations. Absent a contemporaneous objection, we will
review for plain error “where the integrity or fundamental
fairness of the proceedings . . . is called into serious ques-
tion.” Bird v. Glacier Elec. Coop., Inc., 255 F.3d 1136, 1148
(9th Cir. 2001). That is not the case here.

issues arises while appeal is pending because of a change in the law, (3)
or when the issue presented is purely one of law and either does not
depend on the factual record developed below, or the pertinent record has
been fully developed.” Id. (citation and alterations omitted). None of these
exceptions apply.
                               IN RE: RAINS                          15223
   [8] Fourth, as a substantive matter, the main authority
Rains cites in support of his allegation of a due process viola-
tion is Mullane v. Cent. Hanover Bank & Trust Co., 339 U.S.
306 (1950).5 That case simply stands for the proposition that
“[t]he fundamental requisite of due process of law is the
opportunity to be heard.” Id. at 314 (citation omitted). In that
sense, Rains was accorded his full due process rights with
respect to the motion. The declarations of the trustee and his
attorney (Flinn declarations) were filed well in advance of the
hearing. Although the declarations of the creditor and her
attorney were filed only one day before the hearing, Rains’s
counsel had received and read them by the time the hearing
took place, and they were substantially similar in substance to
the Flinn declarations. Rains had adequate opportunity to
challenge the declarations at the hearing before the bank-
ruptcy court.

   [9] Fifth and finally, Rains expressly waived his right to a
separate evidentiary hearing when he filed his opposition to
the motion to approve the settlement.6

  [10] For these reasons, the bankruptcy court did not err in
declining to allow Rains to supplement the evidentiary record.
  5
    The only other authority Rains cites in conjunction with his due pro-
cess claim is inapposite. See Ake v. Oklahoma, 470 U.S. 68, 74 (1985)
(holding that due process requires states to provide indigent defendants
with psychiatric assistance where sanity is likely to be a significant factor
at trial).
  6
    Rains did so pursuant to E.D. Cal. Bankr. 9014-1(f)(1)(ii), which
requires an opposition to a motion to “specify whether the responding
party consents to the Court’s resolution of the disputed material factual
issues pursuant to FRCivP 43(e) as made applicable by FRBP 9017.”
15224                         IN RE: RAINS
  B.       The Second Appeal (Appeal from the Judgment
           Enforcing the Settlement Agreement)

      1.    The Bankruptcy Court’s Jurisdiction

   Rains asserts that his filing of a notice of appeal from the
order approving the settlement agreement transferred jurisdic-
tion to the district court, thereby depriving the bankruptcy
court of jurisdiction to enter the judgment enforcing the settle-
ment agreement. We are not persuaded.

   [11] We review de novo whether the bankruptcy court had
jurisdiction. Dunmore v. United States, 358 F.3d 1107, 1111
(9th Cir. 2004). It is generally true that the timely filing of a
notice of appeal divests the trial court of jurisdiction. See In
re Silberkraus, 336 F.3d at 869 (9th Cir. 2003). However, if
the order at issue is interlocutory, any appeal would be prema-
ture and would not transfer jurisdiction to an appellate court.
See Riggs v. Scrivner, Inc., 927 F.2d 1146, 1148 (10th Cir.
1991); see also United States Abatement Corp. v. Mobil
Exploration & Producing U.S., Inc. (In re United States
Abatement Corp.), 39 F.3d 563, 568 (5th Cir. 1994) (holding
that premature notice of appeal from interlocutory bankruptcy
order was of no effect).7 Rather, the trial court retains jurisdic-
tion to enter final judgment. See Albiero v. City of Kankakee,
122 F.3d 417, 418 (7th Cir. 1997).

   Additionally, the rule that a notice of appeal will divest a
court of jurisdiction “is not absolute.” Neary v. Padilla (In re
Padilla), 222 F.3d 1184, 1190 (9th Cir. 2000). For example,
a trial court retains “jurisdiction to take actions that preserve
the status quo during the pendency of an appeal,” although the
  7
    The trustee contends that the bankruptcy court retained jurisdiction to
enter judgment because the order approving the settlement agreement was
interlocutory. We need not resolve this question because of our conclusion
that whether the order was final or interlocutory, the bankruptcy court
acted within its jurisdiction.
                               IN RE: RAINS                          15225
court “may not finally adjudicate substantial rights directly
involved in the appeal.” Id. (citations omitted). And “[a]bsent
a stay or supersedeas, the . . . court also retains jurisdiction to
implement or enforce the judgment or order but may not alter
or expand upon the judgment.” Id. (citations omitted).

   [12] In this case, the bankruptcy court’s judgment enforc-
ing the settlement agreement, whether considered a final order
or an interlocutory order, did not change the status quo or
materially alter the issues on appeal. The judgment merely
effectuated the express terms of the settlement agreement, and
did not alter or expand upon the order approving the settle-
ment agreement.8 As a result, the bankruptcy court acted
within its jurisdiction when it entered judgment, even though
Rains had already filed a notice of appeal from the order
approving the settlement agreement.

      2.   The District Court’s Jurisdiction Over the Second
           Appeal

   [13] We review the timeliness of a notice of appeal de
novo. Feldman v. Allstate Ins. Co., 322 F.3d 660, 665 (9th
Cir. 2003). Under the district court’s analysis, whether
Rains’s appeal was timely depends on whether his motion to
alter or amend the judgment was properly before the bank-
ruptcy court. A bankruptcy court retains jurisdiction to con-
sider a timely motion under Fed. R. Bankr. P. 9023 to alter or
amend the judgment, even when the motion is filed subse-
quent to a notice of appeal. See Fed. R. Bankr. P. 8002(b)(4);
see also Resolution Trust Corp. v. Keating, 186 F.3d 1110,
1114 n.1 (9th Cir. 1999) (interpreting analogous provision in
  8
   The settlement agreement did not explicitly require Rains to remit
$250,000 in retirement plan funds to the trustee. However, as discussed
below, Rains’s agreement that the funds would become part of the bank-
ruptcy estate in the event he failed to make a timely cash payment trig-
gered a legal duty on his part to surrender the funds to the trustee. See 11
U.S.C. § 521(4).
15226                          IN RE: RAINS
Fed. R. App. P. 4(a)(4) as granting district court jurisdiction
to entertain timely motion to alter or amend the judgment
after notice of appeal is filed). The previously filed notice of
appeal does not become effective “until the entry of the order
disposing of the . . . motion . . . .” Fed. R. Bankr. P. 8002(b)(4).9

   [14] Rains’s notice of appeal from the order approving the
settlement agreement, although filed prior to the motion to
amend judgment, did not divest the bankruptcy court of juris-
diction to consider that motion. See Fed. R. Bankr. P.
8002(b)(4) (listing various post-judgment motions); see also
Keating, 186 F.3d at 1114 n.1. A motion to alter or amend a
judgment must be filed within 10 days after entry of the judg-
ment. Fed. R. Bankr. P. 9023; Fed. R. Civ. P. 59(e). The
bankruptcy court entered judgment on May 23, 2003. Rains’s
motion to alter or amend the judgment enforcing the settle-
ment agreement, filed on June 2, 2003, was therefore timely.

  [15] Rains’s notice of appeal from the entry of judgment
enforcing the settlement agreement was also timely.10 A party
  9
    In Keating, we stated that when a motion to alter or amend the judg-
ment is filed, any previously-filed notice of appeal is rendered ineffective.
Keating, 186 F.3d at 1114 n.1. In so stating, we relied upon Griggs v.
Provident Consumer Discount Co., 459 U.S. 56, 61 (1982). Id. In Griggs,
the United States Supreme Court held that a notice of appeal filed before
a Rule 59(e) motion to alter or amend the judgment “simply self-
destructs.” 459 U.S. at 61 (citation omitted). This holding was effectively
overruled when “Rule 4(a)(4) [of the Federal Rules of Appellate Proce-
dure] was amended . . . to provide that when a notice is prematurely filed,
it shall be in abeyance and become effective upon the date of entry of an
order disposing of the Rule 59(e) motion.” Schroeder v. McDonald, 55
F.3d 454, 458 (9th Cir. 1995). Thus, Rains’s notice of appeal from the
order approving the settlement agreement, rather than self-destructing
when the motion to amend was filed, was simply in abeyance.
   10
      Because of the unique manner in which this case proceeded through
the bankruptcy court and the district court, there are two operative notices
of appeal. The first notice addresses the order approving the settlement
agreement. The second notice pertains to the judgment enforcing the set-
tlement agreement and denying the motion to amend the judgment.
                               IN RE: RAINS                          15227
wishing to appeal a decision of the bankruptcy court must file
the notice of appeal “within 10 days of the date of the entry
of the judgment, order, or decree appealed from.” Fed. R.
Bankr. P. 8002(a). A timely motion to alter or amend the
judgment under Fed. R. Bankr. P. 9023 tolls the time period
for filing a notice of appeal. Fed. R. Bankr. P. 8002(b)(2). In
that case, “the time for appeal for all parties runs from the
entry of the order disposing” of the motion. Fed. R. Bankr. P.
8002(b). The order denying the motion to amend judgment
was entered on July 7, 2003. Rains filed a notice of appeal ten
days later, on July 17, 2003. As a result, the district court had
jurisdiction to hear the appeal (as do we).11 The district court
erred in dismissing Rains’s appeal as untimely.12

       3.   Rains’s Interest in the Retirement Plan

   [16] Section 541(c)(2) of the Bankruptcy Code provides
that “[a] restriction on the transfer of a beneficial interest of
the debtor in a trust that is enforceable under applicable non-
bankruptcy law is enforceable in a case under this title.” 11
U.S.C. § 541(c)(2). “The natural reading of [this] provision
entitles a debtor to exclude from property of the estate any
interest in a plan or trust that contains a transfer restriction
enforceable under any relevant nonbankruptcy law.” Patter-
son v. Shumante, 504 U.S. 753, 758 (1992). The United States
Supreme Court has held that an anti-alienation provision in an
  11
      As Rains points out, the district court probably lacked jurisdiction to
reverse itself on the issue of whether the order approving the settlement
agreement was “final” for purposes of appeal, because the district court’s
reversal of its prior ruling occurred on May 18, 2004, after the prior ruling
was appealed to us on August 6, 2003. See In re Silberkraus, 336 F.3d at
869. In any event, because we review the bankruptcy court’s rulings de
novo, any error committed by the district court in determining the finality
of the settlement order does not affect our analysis.
   12
      However, as we may affirm on any basis supported by the record, we
nevertheless affirm the district court’s judgment in favor of the trustee, as
discussed below. See Parker N. Am. Corp. v. Resolution Trust Corp. (In
re Parker N. Am. Corp.), 24 F.3d 1145, 1151 (9th Cir. 1994).
15228                          IN RE: RAINS
ERISA-qualified pension plan constitutes such a restriction
for purposes of the § 541(c)(2) exclusion. Id. at 760. The
exclusion is permissive rather than mandatory: “a debtor’s
interest in an ERISA-qualified pension plan may be excluded
from the property of the bankruptcy estate pursuant to
§ 541(c)(2)[.]” Id. at 765 (emphasis added). A bankruptcy
court lacks subject matter jurisdiction over excluded ERISA-
qualified pension plan funds. In re McClellan, 99 F.3d 1420,
1423 (7th Cir. 1996).

   [17] In the settlement agreement, Rains agreed that if he
did not make a timely cash payment to the trustee or post
alternative collateral, his exemption claim to the ABA retire-
ment plan would be denied up to the amount of $250,000.
Rains now contends that his interest in the ABA retirement
plan must be excluded from the bankruptcy estate pursuant to
the Employee Retirement Income Security Act (ERISA),13
and that the bankruptcy court therefore lacked jurisdiction to
order him to withdraw $250,000.00 in retirement plan funds
and remit it to the trustee. However, by ceding his claim of
exemption in the settlement agreement, Rains necessarily
agreed to include the retirement plan funds in the bankruptcy
estate pursuant to the “well settled rule that property cannot
be exempted unless it is first property of the estate.” Heintz
v. Carey (In re Heintz), 198 B.R. 581, 586 (B.A.P. 9th Cir.
1996); see also Owen v. Owen, 500 U.S. 305, 308 (1991)
(“No property can be exempted . . . unless it first falls within
the bankruptcy estate”) (emphasis in the original). Rains can-
not now seek to exclude funds from the estate that he previ-
ously agreed were included in the estate. As a result, the
bankruptcy court’s denial of the exemption, in accordance
with the terms of the settlement agreement, triggered a legal
duty to surrender the retirement plan funds to the trustee. See
11 U.S.C. § 521(4) (“The debtor shall . . . surrender to the
trustee all property of the estate . . . .”). Thus, the bankruptcy
court acted within its jurisdiction when it ordered Rains to
  13
    29 U.S.C. § 1001 et seq.
                             IN RE: RAINS                         15229
withdraw $250,000 in plan funds and remit that amount to the
trustee.14

       4.   Rains’s Due Process Claim

   Finally, Rains claims the bankruptcy court violated his due
process rights when it ordered him to surrender the $250,000
in retirement plan funds, because the ordered relief fell out-
side the scope of the agreement and settlement order. Rains
arguably waived this claim by not properly raising it before
the bankruptcy court. See Cold Mountain, 375 F.3d at 891.
Regardless, Rains’s contentions that he was never given
notice of Flinn’s intention to seek payment from the retire-
ment plan funds, and that the bankruptcy court violated his
due process rights by ordering him to surrender the funds,
have no merit.

   [18] Under the Bankruptcy Code, property of the estate
generally includes “all legal or equitable interests of the
debtor in property as of the commencement of the case,” 11
U.S.C. § 541(a)(1), unless the property is excluded or
exempted under state or federal law, see e.g. 11 U.S.C.
§§ 522(b), 541(b), (c)(2). When Rains agreed to the settle-
ment, he expressly acknowledged that his claimed exemption
of retirement plan funds would be denied up to the amount of
$250,000, and these funds would become part of the bank-
ruptcy estate in the event he failed to make a timely cash pay-
ment. As discussed above, Rains became legally obligated to
deliver the funds to the trustee once the exemption was
denied. See 11 U.S.C. § 521(4). Therefore, the judgment was
  14
    The United States Supreme Court’s recent decision in Rousey v.
Jacoway, 125 S. Ct. 1561 (2005) does not alter our conclusion. In Rousey,
the Supreme Court ruled that debtors may exempt assets in their Individ-
ual Retirement Accounts from the bankruptcy estate pursuant to 11 U.S.C.
§ 522(d)(10)(E). Id. at 1564. Rains does not contend that the retirement
plan funds are exempted from the estate under § 522(d)(10)(E). Rather, he
argues that the funds are excluded from the estate altogether pursuant to
11 U.S.C. § 541(c)(2).
15230                     IN RE: RAINS
consistent with the provisions of Chapter 11 of the Bank-
ruptcy Code, the settlement agreement, and the order approv-
ing the settlement agreement, and did not violate Rains’s due
process rights.

   Rains also complains that the application for entry of judg-
ment was made without notice or a hearing. However, “[a]
bankruptcy court, as a court of equity, . . . possesses the
power to summarily enforce settlements.” City Equities Ana-
heim, Ltd. v. Lincoln Plaza Dev. Co. (In re City Equities Ana-
heim, Ltd.), 22 F.3d 954, 958 (9th Cir. 1994) (citation
omitted). The Federal Rules of Bankruptcy Procedure gener-
ally prohibit a trustee from making ex parte contact with the
court “concerning matters affecting a particular case or pro-
ceeding.” Fed. R. Bankr. P. 9003(b) (emphasis added). The
application for entry of judgment in this case did not affect a
pending proceeding, because the issues had previously been
adjudicated, and all that remained for the court to do was
enter a judgment in accordance with the order approving the
settlement agreement. See Texas Extrusion Corp. v. Lockheed
Corp. (In re Texas Extrusion Corp.), 844 F.2d 1142, 1164
(5th Cir. 1988) (concluding that the bankruptcy judge did not
violate rule against ex parte contact by adopting findings and
conclusions after communications with creditor’s attorney
because written findings merely confirmed prior verbal rul-
ing). Thus, any ex parte contact was not improper. In any
event, Rains had sufficient opportunity to air his objections in
his motion to amend the judgment and in the hearing held on
the motion. Rains’s due process rights were fully preserved.

IV.     CONCLUSION

   We have jurisdiction to consider Rains’s appeal from the
bankruptcy court’s order approving the settlement agreement.
The bankruptcy court did not clearly err in finding Rains men-
tally competent to enter into the agreement, and properly
denied Rains’s request to supplement the evidentiary record.
The bankruptcy court had jurisdiction to enter the judgment
                         IN RE: RAINS                   15231
enforcing the settlement agreement; Rains’s appeal from that
judgment was timely; the bankruptcy court properly ordered
Rains to remit $250,000 in retirement plan funds to Flinn; and
Rains’s due process rights were not violated.

  AFFIRMED.
