All 19 U.S. House members and both U.S. senators from Pennsylvania supported a bill to keep the federal government funded for an extra two weeks to delay a government shutdown and allow the chambers to negotiate cuts in a longer bill.

The House passed its version on Tuesday and the Senate followed Wednesday morning with only nine senators voting against it.

"The two-week funding extension passed today avoids a government shutdown this week," Sen. Bob Casey said in a statement. "However, the House and Senate must work together to pass a bill to fund the government for the remainder of this fiscal year. We can’t continually face the threat of a government shutdown and we must avoid hurting the economic recovery."

“While the two-week continuing resolution is not a perfect bill, it is an important victory for the American people when members of both parties agree that we need to make substantial cuts in discretionary spending now,” Sen. Pat Toomey said in a statement (updated at 2:30pm). “It is all the more impressive when you consider that this is only the second time in the past four decades that Congress has actually cut discretionary spending and one of the few times Congress has voluntarily struck earmarks. Little by little, we are changing the way Washington does business.”

The House has already passed a bill to fund the government through Sept. 30, the end of the fiscal year, but Senate Democrats oppose the $61 billion in cuts included in the measure.

President Obama, who will now sign the two-week spending measure, said he has directed Vice President Biden to lead bipartisan talks to work toward a compromise on a longer bill. Obama warned against keeping the government limping along with short-term extensions.

"But we cannot keep doing business this way," Obama said in a statement. "Living with the threat of a shutdown every few weeks is not responsible, and it puts our economic progress in jeopardy."