NORTH ADAMS, Mass. -- Berkshire Medical Center has agreed to pay $4 million for the former North Adams Regional Hospital and other on-campus facilities, as well as a doctors building on State Road, according to documents filed late Monday in Chapter 7 bankruptcy proceedings.

The purchase-and-sale agreement is contingent on whether other bidders step in with higher offers to buy the facilities.

In a filing for Northern Berkshire Healthcare's Chapter 7 bankruptcy, Berkshire Health Systems and the holders of more than $30 million in bond debt have agreed on a sale price of $3.4 million for the hospital, parking garage and administrative building, and $600,000 for the Northern Berkshire Family Medicine building. The agreement includes assets such as medical equipment and office furniture.

The agreement is the "product of a cooperative effort" by the trustee overseeing the Chapter 7 bankruptcy, Berkshire Medical Center, bondholder Wells Fargo Bank, and the Massachusetts Attorney General and "enjoys the support of these constituents," according to the document.

Officials with Berkshire Health Systems, the parent company of Berkshire Medical Center, say $10 million will be spent renovating the North Adams facility and upgrading its technological infrastructure. Northern Berkshire Healthcare, submersed in debt, ran out of money on March 28 and closed the hospital and related businesses. It then declared Chapter 7 bankruptcy, which calls for the liquidation of assets.

Part of the purchase-and-sale agreement allows Berkshire Medical Center to reopen and operate an emergency center at the North Adams hospital for 90 days with no lease payments. U.S. Bankruptcy Court Judge Henry Boroff is expected to rule on the occupancy agreement on Wednesday. Berkshire Medical Center officials have said an emergency center could open by May 19.

It will be weeks before the purchase-and-sale agreement can be finalized. Once the agreement is approved by the court, bankruptcy law allows 45 days for others to bid on the property, which has the potential to derail BMC's offer.

Chapter 7 bankuptcy filings show that Northern Berkshire Healthcare owes $34.3 million in secured debt to Wells Fargo and $6.4 million in low-priority unsecured debt. All together, it totals $40.7 million.

According to Berkshire County-based bankruptcy attorney Jack Houghton, the bondholders - Wells Fargo - would have first crack at any money raised by sale of the properties to recover the money it loaned. Since the $4 million will not satisfy the $34 million in secured debt, the unsecured creditors - for the most part, companies that did business with Northern Berkshire Healthcare - are unlikely to see any of the funds.

Wells Fargo, the world's largest financial institution valued at $236 billion in July 2013, may not recoup the $30 million it was owed.

"Even though it is a lot of money, it's a write-off for them," Houghton said.

Bankruptcy documents also list the former company's assets as $34 million in real property and $9.8 million in personal property, which includes vehicles, computers, furnishings, other technology and $2.7 million in various financial accounts. The total comes to $43.8 million.

The hospital building itself is valued at $29.9 million, including the parking garage.

Mike Leary, spokesman for Berkshire Health Systems, said all negotiating parties agreed that $4 million is a fair price for the hospital and the Northern Berkshire Family Practice building "given the current condition of the buildings."

Including the $10 million investment to upgrade the properties, Leary said the total investment will be $14 million. Berkshire Health Systems will be using cash reserves for the purchase of the properties and the additional investments required, Leary said.

During a press conference on Friday, Gov. Deval Patrick said the state is evaluating whether it would be prudent to either help fund the purchase of the property or to provide some ongoing aid to help fund the operation of the emergency department.

Patrick also said the state will hire a consultancy to determine the health care needs of Berkshire County and what sorts of care are most needed in Northern Berkshire.

State Sen. Benjamin Downing said Tuesday that the agreement was a "necessary step" in restoring health care services to North County.

"I trust the leadership of [BMC] that it's not only good for them, but for the Berkshires," Downing said.

As part of the purchase-and-sale agreement, allowances are made in case another party outbids Berkshire Medical Center that allows it a "fair market lease rate [at the hospital building] for up to a year, while it re-establishes appropriate services elsewhere."

North Adams Regional Hospital's closing affected 530 workers last month. Since then, Northern Berkshire has been without emergency department services, meaning patients are seeking care at Berkshire Medical Center in Pittsfield and Southern Vermont Medical Center in Bennington.