Children's Hospital and the region's largest health insurer reached a last-minute deal yesterday that allows thousands of families to continue using the hospital for at least another month and offers hope that a bitter contract dispute could soon be resolved.

The deal was announced as state regulators were preparing to quiz the nonprofit CareFirst BlueCross Blue Shield about its refusal to pay Children's higher reimbursement rates. The standoff had parents of sick children scrambling to find new doctors by Jan. 1 or wondering how to pay their medical bills if they remained with the pediatric hospital.

The high-profile battle came at a critical time for CareFirst officials, who are seeking state approval to sell the firm to a for-profit insurer based in California. Maryland has just completed three days of hearings on the proposed $1.3 billion sale, which CareFirst says is necessary for its long-term survival in an increasingly consolidated industry.

Questions about the impasse with Children's -- coming one day after CareFirst board members were called upon to justify $119 million in bonus and severance incentives promised to the executives who negotiated the sale -- would have put company officials in an awkward position.

Maryland Insurance Commissioner Steven B. Larsen, who conducted the hearings, said the nexus between the generous bonuses and CareFirst's hard line with Children's Hospital was not lost on the players.

"There's been a lot of public attention being paid to what's going on here, and I think they responded to that," Larsen said. "Sometimes when you feel the heat, you see the light."

Children's and 300 of its pediatric specialists had been preparing to leave CareFirst's network Jan. 1, charging that the insurer's reimbursement rates do not cover the cost of patient care. CareFirst, which has 3.2 million subscribers in Maryland, the District, Virginia and Delaware, had argued that the rates it pays Children's are already higher than other area hospitals receive.

For Children's it was a risky gambit, since CareFirst paid the hospital about $25 million last year, 9 percent of Children's total revenue. About 21,000 CareFirst patients have been treated at the hospital and its seven outpatient centers over the past few years, and the hospital said that 7,800 of them were so medically fragile that a change in doctors could have serious health consequences.

Yesterday's announcement means that Children's will continue to accept CareFirst patients through Jan. 31, and officials from both companies pledged to work toward a more permanent settlement. But parents remained uneasy.

"It's something, but it's obviously only a month," said Michael Shapiro, a Gaithersburg man whose 10-year-old diabetic daughter is a long-term Children's patient. "If it doesn't get resolved by Jan. 31, then we're in a very precarious situation."

The sudden breakthrough represents a turnabout on the part of CareFirst, which had insisted that children treated at the hospital would be able to find adequate care elsewhere at a more reasonable price. Yesterday, David Wolf, CareFirst's executive vice president, said his company intends to use the reprieve to gain a "better understanding of what is unique about Children's Hospital and why there may be some differences" in the rates it charges.

"We want to keep them in our network," Wolf said.

The insurer's medical staff spent yesterday poring over records to determine the number of children who would need to be transferred to new doctors and hospitals, Wolf said, and "it brought home the fact that this was really going to impact a lot of people's lives."

The deal wasn't struck until minutes before both parties were to appear before Larsen, sources said. In the hallway of the Marriott Inner Harbor Hotel in Baltimore, where the hearings were held, Wolf and Edwin K. "Ned" Zechman, the hospital's president, reached a pact that surprised even Larsen.

The talks were encouraged by Sister Carol Keehan, a nun who serves on CareFirst's 21-member board and who is chief executive of the District's Providence Hospital. In a phone call Tuesday, Keehan suggested that Zechman telephone Wolf and discuss resuming formal talks, which had ceased in October.

"They were bloodying each other up," one source said. "The longer they went, the harder it would be to get to a settlement -- and they both knew it."

Zechman followed that suggestion and left a message for Wolf, who returned the call late Tuesday night, sources said.

Larsen initially was skeptical about the reasons for canceling the testimony that would be heavily covered by the media before an audience that included parents of sick patients who relied on the hospital in Northwest Washington. Larsen, along with regulators from the District and Delaware, must approve CareFirst's proposed sale to WellPoint Health Networks Inc.

Established by Maryland during the Depression, CareFirst has long been subsidized by public money to provide affordable insurance. The company received $45 million in tax breaks and incentives from Maryland last year. Consequently, it is considered a public asset, and the proceeds of its sale will go to the jurisdictions in which the firm operates. CareFirst lobbyists have begun pitching the deal as a windfall for cash-strapped governments.

But experts hired by Larsen testified Monday that the $1.3 billion sale price may be far too low. They said the company's top value could be nearly $1 billion more -- money that would go directly to health care programs, such as those serving the uninsured or underwriting the cost of prescription drugs for the elderly.

The $119 million in merger bonus and severance incentives may have depressed the price, experts said, and the nonprofit board may have shirked its fiduciary responsibility in granting them. The proposed payouts also may make the deal illegal under Maryland law, Larsen said.

Daniel J. Altobello, chairman of the CareFirst board, defended the payouts, most of which go to eight top managers. He said the executives deserved recognition and needed incentives to stay with the firm through the merger.

Yesterday, financial experts hired by Larsen questioned the company's rationale for the deal, testifying that CareFirst can remain competitive as a nonprofit for at least five years, despite consolidation trends in the health industry. That could give ammunition to Maryland lawmakers, who are furious over the executive incentives and can overturn Larsen's decision should he approve the sale.

The sale could have profound implications for the region's health care system, potentially affecting rates, quality of care and the number of people without insurance.

Critics have suggested that the dispute with Children's Hospital was aimed at improving the company's bottom line before the sale, and executives were pilloried in placards brought to the hearings by parents with such lines as "CareFirst Cares Less" and "Mr Jews, it's not your money."

William Jews is CareFirst's CEO and stands to make at least $30 million from the proposed deal. "It infuriates me that these executives are getting all this money, their profit margin is very good, and yet they cry poverty when it comes to reimbursing doctors," said Carrin Brandt, a CareFirst policyholder who attended the hearings with her daughter Bailey, an 18-month-old treated by Children's for severe seizures.

Larsen plans hearings next month aimed at determining how a sale of the company might affect policyholders. He is expected to make a decision by February and has wide latitude to change parts of the deal he deems inappropriate. He also ordered CareFirst and Children's to report to him on their progress by Jan. 17.

Children's Hospital President Edwin "Ned" Zechman, left, and Vice President Jacqueline Bowens discuss deal with CareFirst Vice President David Wolf.