WASHINGTON (AP) — President Barack Obama has signed a massive $1.1 trillion spending bill that keeps the government operating over the next nine months.

The legislation was a bipartisan compromise that angered liberals and conservatives alike but avoided a government shutdown and put off partisan clashes over immigration to next year.

Ensuring a debate over immigration, though, the legislation only finances the Homeland Security Department until Feb. 27.

The bill was one of the last acts of Congress under the current Republican House and Democratic-controlled Senate. In January, the new Congress will return with Republicans in charge of both chambers.

The spending bill retains cuts negotiated in previous budget battles and rolls back some banking regulations. But it retains spending for Obama’s health care law and pays for the administration’s fight against Ebola.

Copyright 2014 The Associated Press. All rights reserved. This material may not be published, broadcast, rewritten or redistributed.

Join our Newsletter for the latest news right to your inbox