The measure was part of an agreement reached by congressional Democrats and Republicans late last month that averted a government shutdown at the end of the fiscal year on Sept. 30.
The law provides funding for government operations through Nov. 18. It gives lawmakers time to combine individual spending bills into one and incorporate spending limits agreed to earlier this year. Those negotiations could still go astray if tea party-backed Republicans push for further cuts.
Obama had been expected to sign the bill into law later Wednesday, but signed it when he returned to Washington after appearances Tuesday in Texas.