Signs of progress appeared early on from both Republican and Democratic lawmakers who said they were shooting for a deal by Sunday.
But a group of House Republicans said they would not be held to any "artificial timelines." Still, they remained confident a deal could be reached that helped the financial system but protected taxpayers.
Negotiators had talked by phone with billionaire investor Warren Buffett for guidance, and according to two sources, he warned if congress did not act, the nation would face the "biggest financial meltdown in American history."
Finally after midnight, congressional leaders said they reached a tentative deal and were aiming to craft final legislation by Sunday evening - in time for the start of financial markets around the world.
Key points included who would oversee the program, when the money would go out, government stakes in companies to mitigate taxpayer losses and curbs on executive compensation.
NEXT: Sunday, Sept. 28 - Hard-won agreement