(CNN) -- In a town where politicians like to keep score, the White House isn't boasting about victory.
Republicans and Democrats reached a budget deal late Friday night, averting the possibility of a partial government shutdown.
After the deal was reached, a top Obama advisor told reporters that it was a good night for the country. The American people won, a senior administration official said.
The White House was feeling optimistic that it was on the verge of a deal Thursday night.
When House Speaker John Boehner, R-Ohio, left the Oval Office meeting, "there was an agreement on range and composition," said another official.
But by 3 or 4 a.m. Friday, the officials described a breakdown.
The discussion at the staff level on the Hill no longer reflected the framework of the Oval office discussions, they said.
"There was a higher number," said one official, "North of $80 billion. There was also renewed talk about family planning."
As Republicans and Democrats threw sharp verbal punches at each other throughout the day, the White House remained silent.
The president did not made a public statement nor did spokesman Jay Carney hold his daily briefing. This was by design, according to the officials who briefed reporters.
It was a directive from the president, one official said. The idea was to stay out of sight, avoid finger pointing, and allow negotiators to work out a compromise.
But the president was engaged throughout the process, the officials said.
"Every time the process seemed to get bogged down, the president picked up the phone and made clear that we had a responsibility to the American people, that we shouldn't play politics," one said.
"He did not want this to become a family planning bill; he wanted this to be a spending bill."
On Friday, the president spoke by phone with Boehner four times, and with Senate Majority Leader Harry Reid, D-Nevada, several times, one of the officials said.
During one of the Oval Office meeting this week, one official described how the president went through every controversial rider that Republicans wanted.
Rob Nabors, Obama's legislative affairs director, sought out a copy machine to make copies for everyone. It took so long that Boehner is said to have quipped, "Want to find a faster copy machine?"
In describing the tone of these meetings, one official said, "At no point did the discussions in the room get personal."
The president never scolded Boehner for public comments that appeared to contradict what was being discussed in private negotiations, the officials said.
Neither side wanted a government shutdown, but the president wasn't willing to give ground on allowing the controversial family planning rider to be part of the deal.
"In this case we just were not going to move on this," said one of the officials. "We cut some things that were hard for us to cut."
So what forced the deal? "The clock probably played the most important factor," said one of the officials.
Nabors who was up on the Hill kept the White house informed throughout the negotiation process and signaled that a deal had been reached.
And at 10:30 p.m., White House Chief of Staff Bill Daley informed the president.