The measure had already been passed 285-144 by the Republican-controlled House of Representatives, and will now go to President Obama for signing into law.

The agreement is only temporary, and a new deal will have to be struck by May 19, although the US Treasury says extraordinary measures would be available on that date to delay breaching the debt ceiling for some extra time.

In the meantime, Congress must decide what to do over automatic spending cuts that kick in at the beginning of March and also consider a measure to continue funding the operations of the government by March 27.