WASHINGTON — Speaker Nancy Pelosi was at her wits’ end, and she let President Obama know it.

Scott Brown, the upstart Republican, had just won his Senate race in Massachusetts, a victory that seemed to doom Mr. Obama’s dream of overhauling the nation’s health care system. The White House chief of staff, Rahm Emanuel, once Ms. Pelosi’s right hand man on Capitol Hill, was pushing Mr. Obama to scale back his ambitions and pursue a pared-down bill.

Mr. Obama seemed open to the idea, though it was clearly not his first choice. Ms. Pelosi scoffed.

“Kiddie care,” she called the scaled-down plan, derisively, in private.

In a series of impassioned conversations, over the telephone and in the Oval Office, she conveyed her frustration to the president, according to four people familiar with the talks. If she and Harry Reid, the Senate Democratic leader, were going to stick out their necks for Mr. Obama’s top legislative priority, Ms. Pelosi wanted assurances that the president would too. At the White House, aides to Mr. Obama say, he also wanted assurances; he needed to hear that the leaders could pass his far-reaching plan.

“We’re in the majority,” Ms. Pelosi told the president. “We’ll never have a better majority in your presidency in numbers than we’ve got right now. We can make this work.”