
75 Cal.Rptr.2d 108 (1998)
64 Cal.App.4th 94
William SMITH et al, Plaintiffs and Appellants,
v.
JAMES A. MERRILL, INC. et al, Defendants and Respondents.
No. D027391.
Court of Appeal, Fourth District, Division One.
May 22, 1998.
*109 Bruce M. Douthit, San Diego, for Plaintiffs and Appellants.
Karp & Richardson, N. James Richardson, Huffman & Kostas and James C. Kostas, San Diego, for Defendants and Respondents.
HUFFMAN, Associate Justice.
Plaintiffs William and Nancy Jo Smith and Ralph Wilkerson appeal from a summary judgment entered in favor of defendants James A. Merrill, Inc., James A. Merrill,[1] Kenneth A. Kirkland, and Michael and Claudia Stoneff on plaintiffs' complaint for declaratory relief. In granting summary judgment, the trial court determined as a matter of law that the remaining proceeds of a trustee's sale of real property owned by Ralph and Evon Wilkerson should be distributed to Merrill based on Merrill's judgment hen against the property. Plaintiffs contend Merrill's judgment lien never attached to the property because the Wilkersons recorded a homestead declaration on the property before Merrill recorded his abstract of judgment. We conclude Merrill's judgment lien attached to the property, but issues of fact remain with respect to the amount of that lien due to the prior recording of the Wilkersons' homestead declaration. Accordingly, we reverse the judgment.

FACTUAL AND PROCEDURAL BACKGROUND
The following facts are undisputed.[2] Ralph and Evon Wilkerson owned a home in Alpine which was encumbered by a first deed of trust securing a promissory note. In November 1981, they recorded a homestead declaration with respect to that property.
In March 1983, Gerald and Maryjane Wolfson recorded a second deed of trust on the property, which secured an $18,000 note executed by the Wilkersons. Subsequently, the Wolfsons assigned their interest in the note and deed of trust to defendants Michael and Claudia Stoneff.
Sometime before March 1987, Merrill obtained a judgment against Ralph Wilkerson in the amount of $65,195.44. In March 1987, Merrill recorded an abstract of that judgment with the recorder's office in San Diego County.
In September 1987, the Wilkersons executed a note in favor of Maria Suty in the amount of $30,000. Evon Wilkerson executed a third deed of trust on the Alpine property to secure that note. The deed of trust was recorded in October 1987. Ultimately, Suty's interest in the note and deed of trust was assigned to defendant Kenneth Kirkland.
In July 1988, the Wilkersons gave a fourth deed of trust on the property to plaintiffs William and Nancy Jo Smith to secure a $25,000 note. The Smiths recorded the deed of trust in September 1988.
In early 1995, the Wilkersons were in default on the note secured by the second deed of trust. Accordingly, the Stoneffs commenced proceedings for sale of the property under the power of sale in the deed of trust.[3] On August 28, 1995, the property was sold by San Diego Foreclosure Services, Inc. as *110 trustee for the Stoheffs. The buyer paid $105,100 for the property and assumed the first note and deed of trust. The trustee distributed approximately $50,000 of the sale proceeds to pay the costs of the sale and the note held by the Stoneffs. Approximately $55,000 remained to be distributed.
In October 1995, Ralph Wilkerson, joined by the Smiths, filed a complaint for declaratory relief against Merrill, Kirkland, and the Stoneffs to determine who was entitled to the remaining proceeds of the trustee's sale. Plaintiffs alleged that the Wilkersons' declared homestead in the Alpine property precluded Merrill from claiming the remaining proceeds based on his judgment Ken and that the proceeds should be distributed instead to the junior trust deed holdersKirkland and the Smiths.[4]
Merrill and Kirkland moved for summary judgment, contending Wilkerson was not entitled to claim a homestead exemption in connection with a nonjudicial foreclosure sale and therefore Merrill was entitled to the remaining sale proceeds as the senior henholder following the Stoneffs. Plaintiffs opposed that motion and filed their own motion for summary adjudication. Plaintiffs contended that, pursuant to Code of Civil Procedure[5] section 704.950, subdivision (c), Merrill's judgment lien never attached to the Alpine property because the proceeds of the trustee's sale did not exceed the sum of the senior hens (the first and second deeds of trust) and the applicable homestead amount, which plaintiffs claimed was $75,000. Plaintiffs sought a determination that the deeds of trust held by Kirkland and the Smiths had priority over Merrill's judgment lien and that the Kirkland deed of trust, if valid, was valid as to only half of the sale proceeds because it was executed only by Evon Wilkerson.
After requesting and receiving additional briefing on several issues, the trial court granted Merrill and Kirkland's motion, holding there was no triable issue of material fact that Merrill was entitled to the remaining sale proceeds based on the judgment hen. In so ruling, the trial court relied on the decision in Spencer v. Lowery (1991), 235 Cal.App.3d 1636, 1 Cal.Rptr.2d 795, which held that a judgment debtor may not claim a homestead exemption on the proceeds of a nonjudicial foreclosure sale.
Plaintiffs moved for reconsideration, contending the court had failed to determine the validity and priority of Merrill's judgment lien. The court issued an order granting Plaintiffs' motion, but on reconsideration it merely affirmed its original ruling in favor of Merrill. Accordingly, the court entered judgment directing the trustee to distribute the remaining sale proceeds to Merrill. Plaintiffs appeal.[6]

DISCUSSION
When property is sold at a trustee's sale pursuant to a power of sale contained in a deed of trust, Civil Code section 2924k, subdivision (a) provides for the distribution of the proceeds in the following order of priority:
"(1) To the costs and expenses of exercising the power of sale....
"(2) To the payment of the obligations secured by the deed of trust or mortgage which is the subject of the trustee's sale.
"(3) To satisfy the outstanding balance of obligations secured by any junior hens or encumbrances in the order of their priority.
"(4) To the trustor or the trustor's successor in interest...."
Here, approximately $55,000 in sale proceeds remained to be distributed under Civil Code section 2924k, subdivision (a)(3) after the trustee paid the costs of sale and the note secured by the deed of trust held by the *111 Stoneffs. The trial court concluded Merrill was entitled to the remaining proceeds as a matter of law because his judgment lien was the next lien on the Alpine property following the Stoneffs' deed of trust. Plaintiffs contend Merrill was not entitled to the remaining sale proceeds because Merrill's judgment lien never attached to the Alpine property due to the homestead declaration the Wilkersons recorded in 1981. Although we reject plaintiffs' contention that Merrill's judgment lien never attached to the property, we conclude Merrill was not entitled to the remaining proceeds of the trustee's sale as a matter of law because the amount of his judgment lien remains to be determined.
A judgment hen on real property is created by recording an abstract of a money judgment with the county recorder. (§ 697.310, subd. (a).) Generally, a judgment lien for the amount required to satisfy the money judgment attaches to all interests in real property which are subject to the enforcement of money judgments located in the county where the lien is created. (§§ 697.340, subd. (a), 697.350, subd. (a).) That rule does not apply, however, when a declaration of homestead has been recorded on the property in question before the abstract of judgment is recorded. (See §§ 697.340, 704.950.) In such a case, the judgment hen generally attaches to the declared homestead only "in the amount of any surplus over the total of the following: [H] (1) All liens and encumbrances on the declared homestead at the time the abstract of judgment or certified copy of the judgment is recorded to create the judgment lien. [H] (2) The homestead exemption set forth in Section 704.730."[7] (§ 704.950, subd. (c); see also Teaman v. Wilkinson (1997) 59 Cal. App.4th 1259, 1264, 69 Cal.Rptr.2d 705.)
To the extent plaintiffs rely on pre-1982 case law to argue Merrill's lien never attached to the Alpine property because Merrill never sought to levy execution on the property, plaintiffs' reliance is misplaced. Before the enactment of the Enforcement of Judgments Law (§ 680.010 et seq.) in 1982, a judgment hen could never attach to property subject to a prior homestead declaration, regardless of whether the value of the property exceeded the amount of the homestead exemption. (See, e.g., Engelman v. Gordon (1978) 82 Cal.App.3d 174, 178-179, 146 Cal. Rptr. 835.) The only way for a judgment creditor to reach the excess value in the property above the homestead exemption was to levy execution on the property. (Id. at p. 179, 146 cal.Rptr. 835; Swearingen v. Byrne (1977) 67 Cal.App.3d 580, 585-587, 136 Cal.Rptr. 736.) By enacting subdivision (c) of section 704.950, the Legislature made it possible for the first time for a judgment creditor to obtain a lien on a declared homestead. (See Stoffel v. Dutton (1985) 175 Cal.App.3d 1185, 1187, 221 Cal.Rptr. 346.) That hen attaches to the homestead without the need for any action other than the recording of the abstract of judgment. The amount of the lien is limited, however, to any surplus over the total of (1) any hens and encumbrances existing when the abstract of judgment was recorded, and (2) the amount of the applicable homestead exemption.[8] (§ 704.950, subd. (c).)
Recent case law suggests a judgment hen does not attach to a declared homestead under section 704.950, subdivision (c), unless and until surplus equity exists. For example, in In re Jones (9th Cir.1997) 106 F.3d 923, the Ninth Circuit Court of Appeals held in a two-to-one decision that, under section 704.950, subdivision (c), "the equity in a homesteaded property is measured at the time a judgment lien is recorded. If, at that time, no equity exists then no judgment hen attaches." (In re Jones, supra, at p. 927.) In Teaman, Division One of the Second Appellate District disagreed with the decision of the majority in Jones and held a judgment creditor is entitled to reach surplus equity *112 which accrues after the date the abstract of judgment is recorded. (Teaman v. Wilkinson, supra, 59 Cal.App.4th at pp. 1263-1267, 69 Cal.Rptr.2d 705.) Nonetheless, the court suggested that until surplus equity develops, the judgment lien does not attach to the declared homestead. (Ibid.)
In our view, section 704.950, subdivision (c) does not govern when a judgment hen attaches to a declared homestead, but rather governs only the amount of the hen. Construing section 704.950, subdivision (c) to mean that a judgment hen does not attach to a declared homestead unless and until surplus equity exists would be impractical for several reasons. First, the determination of whether surplus equity exists may not occur until years after the abstract of judgment was recorded, as here. It would be unrealistic to expect a court or the parties to be able to fix exactly when, if ever, during the intervening period surplus equity arose. Second, whether surplus equity exists depends in part on the amount of the applicable homestead exemption. Under section 704.965, however, the amount of the applicable homestead exemption depends on the law in effect at the time the judgment creditor obtained a hen on the declared homestead.[9] If a judgment hen does not attach until surplus equity exists, then whether the lien attached cannot be determined without knowing the applicable homestead amount, but the applicable homestead amount cannot be determined without knowing when the lien attached.
These difficulties are avoided by construing section 704.965, as governing only the amount of the lien on the declared homestead. Thus, although the judgment lien attaches to the homestead when the abstract of judgment is recorded, the amount of the lien will vary over time pursuant to the formula in section 704.950, subdivision (c). (See In re Morgan (Bkrtcy.C.D.Cal.1993) 157 B.R. 467, 469-470.)
Defendants fail to recognize the significance and effect of section 704.965. Instead, relying on Spencer, defendants contend homestead exemptions do not apply to the proceeds of nonjudicial foreclosure sales. Spencer is inapposite. In Spencer, the judgment debtors sought to claim an "automatic" homestead exemption under section 704.720, subdivision (b)[10] to protect the remaining proceeds of a nonjudicial foreclosure sale from execution to satisfy a money judgment. The court held that section 704.720, subdivision (b) applies only to sales in execution of a money judgment and that a judgment debtor may not claim a homestead exemption under that statute if the debtor's property is sold at a nonjudicial foreclosure sale. (Spencer v. Lowery, supra, 235 Cal.App.3d at pp. 1638-1639, 1 Cal.Rptr.2d 795.)
Unlike the judgment debtors in Spencer, Wilkerson is not attempting to claim a homestead exemption under section 704.720, subdivision (b) to protect the remaining proceeds of the trustee's sale from execution by a judgment creditor. Rather, the issue here is to what extent Merrill is entitled to the remaining proceeds of the trustee's sale under Civil Code section 2924k, subdivision (a)(3) as the next senior lienholder following the Stoneffs. To determine to what extent Merrill is entitled to the remaining sale proceeds, it must first be determined whether Merrill's judgment lien attached to the property and, if so, in what amount. That determination is governed by section 704.950, subdivision (c), which incorporates the homestead exemption as part of its formula for determining the amount of the judgment lien. Thus, the homestead exemption is relevant here but only for the purpose of determining the amount of Merrill's judgment hen on the *113 property under section 704.950, subdivision (c).
Based on the foregoing, we conclude Merrill's judgment lien attached to the Wilkersons' Alpine property in March 1987, when Merrill recorded the abstract of judgment. The amount of that hen, however, remains to be determined pursuant to section 704.950, subdivision (c). Because the amount of Merrill's lien will necessarily be reduced by the amount of the applicable homestead exemption,[11] it follows that Merrill was not entitled to the remaining proceeds of the trustee's sale as a matter of law, and the trial court erred in entering summary judgment in favor of Merrill.[12]
We recognize that, to the extent the amount of the applicable homestead exemption reduces the amount of Merrill's judgment lien, the junior consensual lienholders will in effect have partial priority over Merrill because they will be entitled, pursuant to Civil Code section 2924k, subdivision (a)(3), to the remaining proceeds of the trustee's sale not paid to Merrill. We also recognize that due to Ralph Wilkerson's discharge in bankruptcy, Merrill may be unable to recover the remainder of his judgment against Ralph Wilkerson. Neither of those considerations alters our interpretation of section 704.950, however. The purpose of the homestead statutes is to protect the value of the homestead from judgment creditors. (See Webb v. Trippet (1991) 235 Cal.App.3d 647, 650, 286 Cal.Rptr. 742.) Nonetheless, the owner of a declared homestead has the right to encumber the homestead. (§ 704.940.) Had the Wilkersons not chosen to encumber their declared homestead with consensual liens junior to Merrill's judgment lien, the amount of the applicable homestead exemption ultimately would have been paid to them under Civil Code section 2924k, subdivision (a)(4). Because the Wilkersons chose to encumber their homestead, however, the junior consensual Uenholders in effect succeeded to the Wilkersons' interest in the homestead.
Because we conclude plaintiffs are entitled to reversal of the summary judgment against them, defendants' motions for sanctions on appeal are denied.

DISPOSITION
The judgment is reversed. Plaintiffs to recover costs on appeal.
KREMER, P.J., and BENKE, J., concur.
NOTES
[1]  We refer to James A. Merrill, Inc. and James A. Merrill collectively as Merrill.
[2]  Defendants Merrill and Kirkland failed to file a separate statement of undisputed facts in support of their motion for summary judgment, as required by Code of Civil Procedure section 437c, subdivision (b). Rather than object, plaintiffs agreed to the factual statement in defendants' memorandum of points and authorities, with certain exceptions. The facts stated in this opinion are drawn from defendants' factual statement.
[3]  Ralph and Evon Wilkerson both filed petitions for bankruptcy, but the Stoneffs sought and obtained relief from the automatic stay in both cases, allowing them to proceed with the sale. Ralph Wilkerson received a discharge in bankruptcy in October 1995. Evon Wilkerson dismissed her bankruptcy petition in February 1996.
[4]  Plaintiffs also alleged that the sum distributed to the Stoneffs had included an excessive amount for attorney fees. Because the trial court determined Merrill was entitled to all of the remaining proceeds of the trustee's sale, the court had no occasion to determine the attorney fees issue.
[5]  All further statutory references are to the Code of Civil Procedure unless otherwise specified.
[6]  Plaintiffs purport to appeal from the nonappealable order on their motion for reconsideration, rather than from the appealable summary judgment. In the interests of justice, we treat the appeal as having been taken from the judgment. (See Arendell v. Auto Parts Club, Inc. (1994) 29 Cal.App.4th 1261, 1264, fn. 1, 35 Cal. Rptr.2d 83.)
[7]  The stated limitation regarding the amount of the judgment lien does not apply to judgment liens based on judgments for child, family, or spousal support. (§ 704.950, subd. (b).)
[8]  Plaintiffs' reliance on the legislative committee's comment to section 704.950 is likewise misplaced. The comment specifically notes that it "was not revised to reflect the addition of subdivision (c) to Section 704.950 prior to the enactment of the section." (17, West's Ann.Code Civil Proc. (1987 ed.) § 704.950, p. 368.)
[9]  That statute provides: "If a homestead declaration is recorded prior to the operative date of an amendment to Section 704.730 which increases the amount of the homestead exemption, the amount of the exemption for the purposes of subdivision (c) of Section 704.950 ... is the increased amount, except that, if the judgment creditor obtained a lien on the declared homestead prior to the operative date of the amendment to Section 704.730, the exemption for the purposes of subdivision (c) of Section 704.950... shall be determined as if that amendment to Section 704.730 had not been enacted."
[10]  Section 704.720, subdivision (b) provides in relevant part: "If a homestead is sold under this division, ... the proceeds of sale ... are exempt in the amount of the homestead exemption provided in Section 704.730."
[11]  In March 1987, when Merrill obtained a lien on the property, section 704.730 provided for homestead exemptions in the amounts of $30,000, $45,000, or $60,000. (§ 704.730, former subd. (a)(l-3).) The applicable amount depends on facts which cannot be determined from this record.
[12]  We do not address plaintiffs' arguments that they are entitled to dispute the amount of Merrill's judgment, that Kirkland's trust deed is completely void or that he is entitled to only one half of the proceeds, or that the Smiths have standing to sue the Stoneffs for excess foreclosure charges, but we instead leave those issues for the trial court to address in the first instance on remand.
