Shortly after midnight on April 9, White House budget director Jacob Lew issued a memo instructing the government’s departments and agencies to continue their normal operations.

Boehner said the agreement came after “a lot of discussion and a long fight,” and he won an ovation from his rank and file, including the new tea party adherents whose victories last November shifted control of the House to the GOP.

Reid declared the deal “historic.”

The deal marked the end of a three-way clash of wills, but it also set the tone for coming confrontations over raising the government’s borrowing limit, the 2012 budget, and long-term deficit reduction.

At the end of the day, all sides claimed victory—Republicans for the sheer size of the spending cuts and Obama and Reid for jettisoning Republican policy initiatives that would have blocked certain environmental regulations and made changes in a federal program that provides family planning services.

Not all policy “riders” were struck. One provision in the final deal would ban the use of federal or local government funds to pay for abortions in the District of Columbia. Republicans had also included language to deny federal funding to implement the year-old health care law, but the new budget deal only requires such a proposal to be voted on by the Senate, where it is certain to fall short of the required 60 votes.

The deal came together after six grueling weeks as negotiators virtually dared each other to shut the government down. Boehner faced pressure from his rank and file to hew as closely to the $61 billion in cuts and the conservative policy positions that the House had approved earlier in the year.

At one point, Democrats announced that negotiators had locked into a spending cut figure—$33 billion. But Boehner pushed back, publicly declaring there was no agreement. Last week, during a meeting at the White House, Boehner said he wanted $40 billion. The final number fell just short of that.

In one dramatic moment, Obama called Boehner on the morning of April 8 after learning that the outline of a deal they had reached with Reid in the Oval Office the night before was not reflected in the pre-dawn staff negotiations. The whole package was in peril.