
19 B.R. 481 (1982)
In re DUNCKLE ASSOCIATES, INC., Debtor.
Bankruptcy No. 81-02835K.
United States Bankruptcy Court, E.D. Pennsylvania.
April 15, 1982.
*482 Robert A. Kargen, Robert M. Schwartz, Philadelphia, Pa., for Nat. Permanent Fed. S & L Assn.
Edward T. Feierstein, Philadelphia, Pa., for Specialty Co.
Stuart M. Cohen, King of Prussia, Pa., for debtor.
Roger F. Wood, Philadelphia, Pa., for Summit Utilities Co. & The New Partnership.
Donald M. Collins, Philadelphia, Pa., for Subcontractors.
Daniel E. Beren, Philadelphia, Pa., trustee.
Nathan Lavine, Philadelphia, Pa., for Fort McHenry Lumber Co. & John Benner Co.

OPINION
WILLIAM A. KING, Jr., Bankruptcy Judge.
On January 21, 1982, the Court entered an Order denying the application of a secured creditor to obtain a super priority lien for funds to be expended to winterize four (4) partially completed construction projects on which it held first deeds of trust. The following Opinion is entered in support of that Order.[1]
The issue at bench is whether the Bankruptcy Reform Act of 1978 (the Code) authorizes a secured creditor of the Chapter 11 debtor to expend approximately $670,993.00 for winterization of the debtor's major asset and to secure those expenditures by a lien having priority over preexisting lienholders. Because the application of the secured creditor, National Permanent Savings and Loan Association (National Permanent),[2] presents an issue of first impression, a detailed exposition of the underlying facts is warranted before the pertinent legal theories can be analyzed.
The debtor, Dunckle Associates, Inc., is a debtor in possession, having filed a petition for reorganization under Chapter 11 of the Code on July 20, 1981. Prior to the filing of its petition, the debtor was engaged principally in the development and construction *483 of four (4) multi-unit luxury housing projects. The projects are known as Sugarland West, located in Loudoun County, Virginia; Glenwood Manor, located in Fairfax County, Virginia; Mary Catherine Estates, located in Prince George's County, Maryland; and Indian Queen East, located in Prince George's County, Maryland. National Permanent has recorded first deeds of trust in each of the four (4) projects.[3] The total amount of secured indebtedness owing National Permanent as of November 1, 1981, is approximately $5,641,249.00.
With respect to the two (2) partially completed projects in Prince George's County, Maryland, National Permanent's deeds of trust are liens prior to all other liens and encumbrances. However, because of the unusual priority status granted to mechanic lienholders' under the law of the Commonwealth of Virginia, National Permanent's liens, which are the first deeds of trust on the two (2) partially completed projects in Virginia, may be subordinated to properly perfected mechanic's liens. Section 43-21 of the Virginia Code provides in part:
No lien or encumbrance upon the land created before the work was commenced or materials furnished shall operate upon the building or structure erected thereon or materials furnished for or used in the same, until the lien in favor of the person doing the work or furnishing the materials shall have been satisfied; nor shall any lien or encumbrance upon the land created after the work was commenced or materials furnished operate on the land, or such building or structure, until the lien in favor of the person doing the work or furnishing the materials shall have been satisfied . . .
Va.Code § 43-21 (1950) (emphasis added). The Virginia mechanics' lien statutes prescribe a method whereby laborers and materialmen, incident to new construction or improvements to real estate, may perfect a lien upon the improved real estate to the extent of the value of their goods or services which contributed to the value of the realty. See Va.Code §§ 43-3, 43-4 (1950). Moreover they accord to these liens a priority over all other liens to the extent of the value of the improvements. Liens prior in time retain priority as to the value of the property before the improvements were made.[4]DeWitt v. Coffey, 150 Va. 365, 143 S.E. 710 (1928); Rust v. Indiana Flooring Co., 151 Va. 845, 145 S.E. 321 (1928).
The gravamen of National Permanent's application is that the four (4) partially completed projects may be damaged by the impending winter weather, thereby resulting in a substantial diminution in their value. Furthermore, the debtor in possession has ceased construction on the four (4) projects and is currently unable to conduct a winterization program. National Permanent, however, is willing to expend the $670,993.00 necessary to winterize the projects. To secure this expenditure, National Permanent requests a super priority lien which has the effect of subordinating pre-existing liens, with the possible exception of the mechanic lienholders' on the two (2) Virginia projects.
At the December 14, 1981 hearing on National Permanent's application, there was considerable disagreement among the participants[5] regarding the nature and extent of the work required to effectuate the winterization program. The applicant contends that the $670,993.00 is necessary to *484 winterize the projects in the most cost effective manner. Essentially, the most cost effective method to preserve the value of the projects is to resume construction on the partially completed units and proceed in the normal sequence of construction.[6]See N.T. at 40. On the other hand, the objecting secured creditors argue that the projects can be more cheaply winterized by simply boarding up the exposed portions of the partially completed units. Because the Court denied National Permanent's application, we need not determine the proper method to be utilized for the winterization program.

I
National Permanent argues that section 364(d) of the Code authorizes a secured creditor to obtain a super priority lien for monies to be expended for winterization of property of the estate. Section 364(d) provides as follows:
(1) The court after notice and a hearing, may authorize the obtaining of credit or the incurring of debt secured by a senior or equal lien on the property of the estate that is subject to a lien only if
(A) The trustee is unable to obtain credit otherwise; and
(B) there is adequate protection of the interest of the holder of the lien on the property of the estate on which such senior lien or equal lien is proposed to be granted.
11 U.S.C. § 364(d) (1980) (emphasis added).[7] Section 364(d) explicitly provides that a trustee is empowered to incur debt secured by a senior or equal lien on property of the estate. Moreover, a debtor in possession in a Chapter 11 proceeding has all the rights, powers, and duties of a trustee[8] and, therefore, is also permitted to utilize the super priority provisions of section 364(d). See In re Creed Taylor, Inc., 10 B.R. 265, 267 (Bkrtcy.S.D.N.Y.1981) (under Chapter 11 of the Code, a debtor in possession has the same rights and powers as the trustee); In re Harms, 10 B.R. 817, 822 (Bkrtcy.D.Colo. 1981) (under section 1107(a), the debtor in possession stands in the shoes of the Chapter 11 trustee). Nowhere does section 364(d), or any of the case law interpreting that section,[9] permit a secured creditor of *485 the Chapter 11 debtor to expend funds for the preservation of the debtor's property and obtain a lien on the encumbered property that is senior or equal to pre-existing liens.
The failure of Congress to make any mention of a secured creditor's ability to apply for a senior lien on property of the estate under § 364(d) was not inadvertent. See generally In re Scandia Builders, Inc., 446 F.Supp. 115, 118 (N.D.Ga.1978). Section 364(d) is actually a provision to be invoked only in the most compelling and extraordinary circumstances. It is available only to the trustee or debtor in possession and only when credit is unavailable elsewhere. 11 U.S.C. § 364(d)(1)(A). In addition, the applicant must provide adequate protection to existing lienholders whose interests will be subordinated.[10] 11 U.S.C. § 364(d)(1)(B). Therefore, the Court holds that section 364(d) does not provide a basis for granting a senior or equal lien to a secured creditor of the Chapter 11 debtor without the application of the trustee or, in this instance, the debtor in possession. Our holding obviates the need to determine if credit was unavailable elsewhere and whether adequate protection was provided the junior lienholders. For the reasons set forth herein, National Permanent's application to obtain a super priority lien under section 364(d) of the Code was denied on January 21, 1982.

II
Alternatively, National Permanent asserts that section 105(a) of the Code authorizes the granting of a senior or equal lien to secure funds expended by the applicant for the preservation of the debtor's major asset. Section 105(a) provides as follows:
(a) The bankruptcy court may issue any order, process, or judgment that is necessary or appropriate to carry out the provisions of this title.
11 U.S.C. § 105(a) (1980). This section is the basis for a broad exercise of equitable powers by a bankruptcy court. See 2 Collier on Bankruptcy ¶ 105.1 at 2 (15th ed. 1981). However, it is the viewpoint of this Court that the equitble powers enumerated in section 105(a) are not unrestricted. They should be exercised only where it is necessary or appropriate to implement the provisions of the Bankruptcy Code or where equity[11] and substantial justice requires. In re Sholos, 11 B.R. 782, 784, 8 B.C.D. 109 *486 (Bkrtcy.W.D.Pa.1981). Furthermore, it has always been the position of this Court that equity should contradict clear legal principles in only rare instances. In re Andorra Meat Market, Inc., 7 B.R. 744, 747 (Bkrtcy. E.D.Pa.1980).
National Permanent argues, inter alia, that because the debtor in possession is unable to provide adequate protection to National Permanent's interest against possible dimunition in the value of the property due to inclement weather, their interests can only be protected by authorizing them to winterize the projects and, thereafter, grant a senior or equal lien for the funds expended. We find this argument unpersuasive.
It appears that the total amount of secured indebtedness owing National Permanent exceeds the current combined value of the four (4) projects. It follows, therefore, that any corresponding increase in the value of the projects attributable to the winterization program would inure solely to the benefit of the applicant. In other words, National Permanent's interest in the four (4) projects, including any advances made to winterize, would be adequately protected without the granting of a super priority lien.
National Permanent further argues that a senior or equal lien should be authorized under § 105(a) because the winterization program will not only prevent further dimunition in value of the debtor's major asset, but may also increase the value of the asset so that all creditors may ultimately benefit. This argument was expressly rejected in Scandia, 446 F.Supp. at 119. In Scandia, the debtor sought to borrow up to $50,000 and secure the debt with certificates of indebtedness which would have priority over any pre-existing secured interest pursuant to section 344 of the old Bankruptcy Act. 11 U.S.C. § 744 (1938) (repealed).[12] In denying the debtor's application for a super priority lien, the court states: "[T]he bankruptcy court must not subordinate secured parties in the broad interest of increasing the value of the asset so that all creditors may ultimately fare better. A Chapter XI court should not force the secured party to take risks which he feels secure against, specifically, a superior lien." Id. at 119. Accord Matter of Barser Construction Corp., 7 B.R. 499, 502 (Bkrtcy.D.P.R.1980).
In view of the foregoing, despite the possible increase in the value of the projects due to the winterization program, this does not, without more, warrant the extreme remedy of authorizing a super priority lien which has the effect of displacing the priority positions of unconsenting junior lien-holders. Furthermore, in light of the fact that a senior or equal lien should only be authorized in rare or extraordinary circumstances, the proper remedy for National Permanent may be to request relief from the automatic stay provisions set forth in section 362 of the Code.[13] In Scandia, the court suggested that a less intrusive alternative to insure the preservation of the debtor's property would be to lift the automatic stay and permit foreclosure rather than subordinating preexisting interests by authorizing a super priority lien. 446 F.Supp. at 118.
In the instant proceeding, the deeds of trust expressly authorize National Permanent to take whatever steps necessary to *487 preserve the value of the projects, absent an automatic stay in a bankruptcy proceeding. Under the circumstances, it is unlikely that the debtor in possession would be able to show any viable reason why the § 362 automatic stay should not be modified to permit National Permanent to foreclose.

III
Accordingly, for all the reasons set forth herein, the Court denied, on January 21, 1981, the application of National Permanent Federal Savings & Loan Association to expend monies for a winterization program and to secure those expenditures by a super priority lien pursuant to either section 364(d) or section 105(a) of the Code.
NOTES
[1]  This Opinion constitutes the findings of fact and conclusions of law in accordance with Rule 752 of the Rules of Bankruptcy Procedure.
[2]  National Permanent is a federally chartered savings and loan association with its principal offices in Washington, D.C., and is the successor by merger to Eastern-Liberty Federal Savings and Loan Association.
[3]  Secured indebtedness owing National Permanent on each project is approximately:

(1) Sugarland West$969,723.00
(2) Glenwood Manor$3,488,014.00
(3) Mary Catherine Estates$633,039.00
(4) Indian Queen East$549,829.00
[4]  See Lyle and Davies, Virginia Mechanics' Liens: A Precarious Priority, 21 Wash. & Lee L.Rev. 235 (1964), for a scholarly commentary on section 43-21 of the Virginia Code Va.Code § 43-21 (1950). The authors suggest that under Virginia law, a properly perfected mechanic's lien, to the extent of the improvements made to real estate, is well nigh invulnerable. Id. at 242.
[5]  Entries of Appearance were filed by Summit Utilities Company and the New Partnership which hold deeds of trust on the four (4) projects as well as Fort McHenry Lumber Co., John Benner Co., and various subcontractors and material suppliers which hold mechanic liens.
[6]  On numerous unfinished units, the most cost effective method would include, for example, pouring driveways, excavation, interior carpentry, and inserting doors and windows. Exhibit JNational Permanent's Application.
[7]  Section 364(d) is derived from Section 344 of the old Bankruptcy Act which provided:

During the pendency of a proceeding for an arrangement, or after the confirmation of the arrangement where the court has retained jurisdiction, the court may upon cause shown authorize the receiver or trustee, or the debtor in possession, to issue certificates of indebtedness for cash, property, or other consideration approved by the court, upon such terms and conditions and with such security and priority in payment over existing obligations as in the particular case may be equitable.
11 U.S.C. § 744 (1978) (repealed). Under section 344, it was beyond dispute that the statute granted to the bankruptcy court the power to authorize the trustee or debtor in possession to issue certificates of indebtedness. In re Scandia Builders Inc., 446 F.Supp. 115, 117 (N.D.Ga. 1978); 8 Collier on Bankruptcy ¶ 344 at 964 (14th ed. 1978). Yet, there was considerable dispute whether these certificates could interfere or displace the rights and priority positions of secured creditors. The better view, however, was that the bankruptcy court did have the power to subordinate pre-existing liens to certificates of indebtedness issued under Section 344 in a Chapter XI case, but only in those instances where subordination was essential for preserving the encumbered property. Matter of Barser Const. Corp., 7 B.R. 499, 501 (Bkrtcy.D.P.R.1980); Scandia Builders, 446 F.Supp. at 117; 2 Collier on Bankruptcy ¶ 364.04 at 9 (15th ed. 1981).
[8]  Section 1107(a) of the Code provides in part:

(a) Subject to any limitations on a trustee under this chapter, and to such limitations or conditions as the court prescribes, a debtor in possession shall have all the rights, other than the right to compensation under section 330 of this title, and powers, and shall perform all the functions and duties, except the duties specified in sections 1106(a)(2), (3), and (4) of this title, of a trustee serving in a case under this chapter.
11 U.S.C. § 1107(a) (1980).
[9]  See Matter of Stanley Hotel, Inc., 15 B.R. 660 (Bkrtcy.D.Colo.1981) for an illustration of the proper use of section 364(d). In Stanley Hotel, the trustee of the Chapter 11 debtor sought authority under § 364(d) to obtain a loan of approximately $700,000 to protect the debtor's major asset and to grant the lender a super priority lien. The court held that where the trustee of the Chapter 11 debtor could not obtain credit elsewhere and where the junior lienholders were afforded adequate protection because, under the terms of the agreement between the trustee and the lender, the latter would waive its senior lien status in the event no plan of reorganization was confirmed, the granting of a super priority lien under section 364(d) was appropriate. Id. at 664.
[10]  Adequate protection need not be afforded to subordinated junior lienholders in all instances. The law is well settled that valueless junior secured positions or unsecured deficiency claims are not entitled to adequate protection. In re 620 Church Street Building Corp., 299 U.S. 24, 57 S.Ct. 88, 81 L.Ed. 16 (1936); 2 Collier on Bankruptcy ¶ 361.01 at 13 (15th ed. 1980). The essence of adequate protection is that there be protection for the realization of payment of a claim against the property as of the date of filing the case. As a matter of policy and constitutional law, this protection extends only to a creditor's allowed secured claim and the unsecured portion of a claim will not be entitled to protection. ¶ 361.01 at 5. The amount of the allowed secured claim which must be provided adequate protection is determined in accordance with § 506(a) of the Code. See, e.g., In re BBT, 11 B.R. 224, 229 (Bkrtcy.D. Nev.1981). Section 506(a) provides in part that an allowed secured claim of a creditor secured by a lien on property in which the estate has an interest is a secured claim to the extent of the value of the creditor's interest, and, to the extent that the value is less than the amount of the total allowed claim, the claim is unsecured. 11 U.S.C. § 506(a) (1980).
[11]  In Lemon v. Kurtzman, 411 U.S. 192, 93 S.Ct. 1463, 36 L.Ed.2d 151 (1973), Chief Justice Burger stated: "In equity, as nowhere else, courts eschew rigid absolutes and look to the practical realities and necessities inescapably involved in reconciling competing interests. . . . Moreover, equitable remedies are a special blend of what is necessary, what is fair and what is workable." Id. at 201. See also, In re Hotel Associates, Inc., 3 B.R. 343, 6 B.C.D. 160 (Bkrtcy.E.D.Pa.1980); In re Metro Stores Company, Inc., 4 B.C.D. 886 (Bankr.S.D.N.Y.1978).
[12]  The Bankruptcy Act of 1898 was repealed on October 1, 1979, P.L.No.95-598, 92 Stat. 2549 (1978). Section 364 of the Bankruptcy Code is derived from § 344 of the prior Act. Compare 11 U.S.C. § 364 (1980) with 11 U.S.C. § 744 (1978) (repealed). See note 7 supra.
[13]  Section 362(d) provides as follows:

(d) on request of a party in interest and after notice and a hearing, the court shall grant relief from the stay provided under subsection (a) of this section, such as by terminating, annulling, modifying, or conditioning such stay
(1) for cause, including the lack of adequate protection of an interest in property of such party in interest; or
(2) with respect to a stay of an act against property, if
(A) the debtor does not have an equity in such property; and
(B) such property is not necessary to an effective reorganization.
11 U.S.C. § 362(d) (1980).
