Washington CNN  — 

The Department of Homeland Security won’t run out of money anytime soon.

The House cleared legislation Tuesday that will keep the agency operating through the end of September after a standoff last week threatened to shutter the agency and furlough thousands of workers. The 257-167 vote sends the bill to President Barack Obama for his signature.

Republican House Speaker John Boehner, who rarely casts votes, backed the bill, along with his top lieutenants. A majority of House Republicans opposed the bill. Just 75 GOP lawmakers joined with 182 Democrats to push it across the finish line.

The legislation does nothing to rein in Obama’s immigration executive orders – a top priority of conservatives. That issue was a sticking point for weeks as Republicans tried to tie DHS funding to the repeal of the orders but the party couldn’t overcome Democratic filibusters in the Senate.

READ: DHS fight hits home in border town

The debate sparked plenty of drama on Capitol Hill over the past week. The House stayed in session late into the night on Friday after conservatives helped block a bill that would have kept DHS open for 3 weeks. Amid rumors of a potential coup, Speaker John Boehner pushed through a bill that kept the agency open until March 6 – just enough time to work out today’s deal.

Boehner told his members Tuesday morning that he had run out of options and the Senate couldn’t pass a bill with immigration language attached.

He asked if anyone had any questions and not one member stood up or complained.

Homeland Security Secretary Jeh Johnson praised the vote in an email to the department’s employees.

“Without a doubt, the path to get here was an 11th-hour roller-coaster ride,” he wrote. “But, in the end Congress provided a strong bipartisan vote of confidence in our department and your work.”

CNN’s Ted Barrett and Eric Bradner contributed to this report.