ELLSWORTH, Maine — Last-minute negotiations on Monday have resulted in an agreement between Anthem Blue Cross and Blue Shield and Maine Coast Memorial Hospital that will keep the hospital in Anthem’s network of health care providers through the end of 2009.

The 15-month agreement was reached after a three-hour meeting in Bangor on Monday, the day before the current contract would have expired. The contract, which has been extended twice during negotiations between the two parties, would have expired at midnight Tuesday.

Anthem already had begun notifying its members that Maine Coast would no longer be a part of its network.

According to a press statement issued jointly on Tuesday, the new contract, which already has been signed by both parties, will be in effect through Dec. 31, 2009. The hospital and Anthem will continue to discuss future contract terms beyond that time.

No other terms of the contract will be released.

The contract negotiations had dragged on for about two years. The previous three-year contract expired on June 30, 2007, and had been extended twice, first until June 30, 2008, and then to Sept. 30.

The sticking point in the discussions was the discount the hospital guarantees to the insurance company for the cost of the health care the hospital provides. Generally, insured patients pay a portion of their bill, while the insurer pays its share. Insurance companies negotiate with hospitals to determine how much the company actually pays for its share of the bill.

At a press conference last week, Maine Coast officials said Anthem had asked the hospital to triple the discount it offers to the insurer. While officials declined to discuss the amount of Anthem’s discount, they said tripling the discount would cost the hospital $2.6 million in the first year.

Anthem payments account for more than 20 percent of the hospital’s net revenues, according to the hospital, and the company’s discount already is the highest of all the insurers with which Maine Coast deals.

The hospital’s annual net revenue is around $90 million, he said, and Anthem accounts for about $20 million of that income.

Anthem officials countered that the cost of health care at Maine Coast was higher than at other, similarly sized hospitals in the state.

A major consequence of a failure to reach an agreement was that, if the contract expired, the hospital would no longer be in the company’s network of providers. That would have meant that many of the approximately 6,000 Anthem-covered patients who continued to use Maine Coast likely would have seen an increase in out-of-pocket expenses because they would be charged at a higher, out-of-network rate.

With the now contract signed and in place, there will be no interruption of service, and the new contract will not affect the level of coverage of those patients.

Neither party would discuss the agreement beyond statements made in a press release.

“We are pleased to have reached a mutually agreeable contract with Maine Coast Memorial Hospital so that our members can continue to use the hospital for high-quality care,” Anthem President Dan Corcoran said in a prepared statement. “We have negotiated a contract which we believe serves the best interest of our members.”

Maine Coast President and CEO Douglas Jones said the agreement would allow the hospital to continue to serve all the patients insured through Anthem.

“With this contract, we will be able to continue to provide medical care to all of Anthem Blue Cross and Blue Shield’s members without any interruption of or changes in service,” Jones said in the press release. “Our goal is to provide the best care possible for the people in the communities we serve.”