minute budget deal forged with tough bargaining averted an embarrassing US government shutdown, cut billions in spending and provided the first major test of the divided government that voters ushered in five months ago. Working late into Friday night, congressional and White House negotiators finally agreed on a plan to pay for government operations through the end of September while trimming $38.5 billion in spending. Lawmakers then approved a measure to keep the government running for a few more days while the details of the new spending plan are written into legislation. Actual approval of the deal is expected in the middle of next week. "Americans of different beliefs came together again," President Barack Obama, a Democrat, said from the White House. Amid the biggest clash yet between Democrats and the resurgent Republicans who control the House of Representatives, Obama had warned that a shutdown would damage the economy's recovery by putting an estimated 800,000 government employees out of work. The political stakes of a shutdown were huge ahead of next year's presidential and congressional elections. During the last government shutdown in Bill Clinton's presidency, Republicans got most of the blame - but there was no assurance that would have happened again.