Updated

The Republican-controlled House of Representatives approved legislation Wednesday to prevent a U.S. government shutdown on March 27 and blunt the impact of newly imposed spending cuts on the Defense Department.

The 267-151 vote sent the measure to the Senate, where Democrats hope to give additional Cabinet agencies similar flexibility in implementing their shares of the $85 billion in economic recovery-threatening spending cuts required to take effect by the end of the budget year on Sept. 30.

Republicans said the measure was essential to keep the government operating smoothly after current funding expires on March 27.

The measure underscored joint efforts by the Obama administration and congressional Republicans to ease the impact of the deep spending cuts that kicked in with dire White House warnings last week.

The overall size of the cuts remains in place, with half from defense and half from domestic programs. But the House legislation gives the Pentagon and the Veterans Affairs Department flexibility to allocate cuts that no agency currently has.

Senate Democrats seem likely to agree to the flexibility if it can be expanded to include other agencies, according to several officials who described closed-door talks that involved the White House. Among the candidates are the departments of Homeland Security, Transportation, Justice and State. The officials spoke on condition of anonymity, saying they were not authorized to disclose details.

The move marks a reversal for President Barack Obama, who spoke dismissively in recent days of Republican plans for flexibility in administering the cuts.

"You don't want to have to choose between, Let's see, do I close funding for the disabled kid or the poor kid? Do I close this Navy shipyard or some other one?" he said Feb. 26.

The cuts were designed to be blunt and unattractive that the Obama administration and a bitterly divided Congress would be forced to come up with an alternative for trimming the country's deficit. They didn't, which now leaves agencies with the challenge of chopping the same rough percentage of their budgets, no matter their priority or efficiency.

Agency heads lined up for weeks to warn about the possible consequences. The military was the most vocal.

Pentagon officials have embraced the idea of budget flexibility.

The difference for the Navy is "almost night and day," Adm. Jonathan Greenert, the chief of naval operations, told Congress on Tuesday.

The Pentagon did not immediately say whether it also would be able to order the USS Harry S. Truman to the Persian Gulf region, a mission it announced earlier would fall victim to the cuts.

In another sign of efforts at bipartisanship, Obama was hosting Republican senators for dinner at the White House on Wednesday and plans a rare meeting with congressional Republicans next week as tensions between his administration and the opposition party remain high over ways to fix the country's massive deficit.

Obama's requests for meetings next week were confirmed by House Speaker John Boehner's office and Senate Minority Leader Mitch McConnell's office, which said Obama last attended the Senate Republicans' policy lunch in May 2010.

But McConnell, Boehner and other members of the Republican leadership were left out of Wednesday's dinner with Obama. They also didn't make the list of Republican lawmakers Obama started calling over the weekend.

White House aides say the calls focus in part on jumpstarting broader budget talks, but also on Obama's proposals for overhauling the nation's immigration laws and enacting stricter gun control measures.

"He is reaching out and talking to members about a variety of issues -- not just our fiscal challenges, but certainly the fiscal issues are among the issues he is talking about with lawmakers," White House spokesman Jay Carney said.

A congressional aide said the lawmakers scheduled to attend Wednesday's dinner with the president are Sens. John McCain, Lindsey Graham, Kelly Ayotte, Roy Blunt, Pat Toomey, Bob Corker and Ron Johnson.