With a midnight deadline approaching, the White House and Congress scrambled on Friday to break a budget impasse that threatens to shut down the government and idle thousands of federal workers.

Democratic and Republican congressional leaders blamed each other for the stalemate over government funding for the rest of the fiscal year, which ends September 30, and could not even agree on what issues were the final stumbling blocks to a deal.

Democrats said the two sides were at odds over a Republican push to include birth control restrictions in the agreement, while Republicans said spending cuts were the issue.

Without an agreement on spending for the next six months, money to operate the government runs out at midnight on Friday and agencies such as the Internal Revenue Service would begin a partial shutdown.

The White House said a shutdown would idle about 800,000 federal government workers and put a crimp in the U.S. economic recovery. Vital services such as defense, law enforcement, emergency medical care and air traffic control would continue.

Investment firm Goldman Sachs estimated a government shutdown lasting more than a week could cost the economy $8 billion in missed federal spending, dragging down growth.

Republican and Democratic negotiators have agreed to $38 billion in cuts for the current fiscal year but remain at odds over where they would fall. Republicans are resisting a Democratic proposal to cut $1.7 billion from defense.

President Barack Obama called House of Representatives Speaker John Boehner, the top Republican in Congress, and Senate Majority Leader Harry Reid, the top Democrat, about the continuing talks.

Reid told reporters the last issue was a Republican push to block federal funds for Planned Parenthood, a family planning group that is the country's largest abortion provider.

Reid said Republicans would bring the federal government to a halt in order to deny funding to women's health clinics.

Republicans want to shut down the government because they think there's nothing more important than keeping women from getting cancer screenings. This is indefensible and everyone should be outraged, Reid said on the Senate floor.

'ONLY ONE REASON'

Boehner said the final stumbling block was the Democrats' refusal to accept spending cuts that would begin to rein in budget deficits hitting $1.4 trillion a year.

There's only one reason we do not have an agreement as yet and that issue is spending, Boehner told reporters. We're close to a resolution on the policy issues.

Senate Republican Leader Mitch McConnell said he expected lawmakers to reach agreement on a spending plan and avert a government shutdown.

I believe there will be an agreement here shortly, McConnell said in a Senate speech after Reid spoke.

Fear that a U.S. government shutdown could hurt economic growth on the margins pressured the dollar and U.S. Treasury prices on Friday. Longer-term, investors are looking at the 1995 shutdown when predictions of spending cuts made both government debt and dollar more appealing, and both rose.

Citigroup, the third-largest U.S. bank, also noted the budget debate is raising concern among foreign investors about how the U.S. government will be able to deal with the budget deficit, federal debt and the budget talks for the 2012 fiscal year, which begins October 1.

The showdown is the biggest test of leadership for Obama, a Democrat, and congressional leaders since Republicans made big gains and took control of the House of Representatives in elections last November.

The confrontation carries big political risks for both parties, who could be seen by voters as failing to make compromises.

But Boehner is under pressure to stand firm in the talks from Tea Party conservatives who helped fuel last year's big Republican election gains.

Reid said Democrats planned to vote on a one-week funding extension with no spending cuts to give more time for negotiations, after Obama threatened to veto a bill passed by the Republican-led House for a one-week extension that included another $12 billion in spending cuts.

Republicans said they would not allow a vote on a stopgap measure to keep the government operating beyond midnight unless it contains additional spending cuts.

(Additional reporting by Patricia Zengerle, Kim Dixon, Donna Smith, David Alexander, Thomas Ferraro and David Morgan; Writing by John Whitesides; editing by Will Dunham)