WASHINGTON - The federal deficit is shrinking more quickly than expected, and the government's long-term debt has largely stabilized for the next decade, the Congressional Budget Office said Tuesday, in a report that could strengthen the Obama administration's hand in the budget battles with Republicans.

The budget office continues to say the federal government faces a long-range budget problem - mostly caused by the costs of an aging population - but its new forecast pushes the crunch point for that problem off into a considerably more distant future - well after the 2020 presidential election.

The deficit projection for this year - $642 billion - is almost 25 percent smaller than the deficit the budget office had forecast as recently as February. At that level, the annual deficit would be back to where it was before President Obama took office. It would continue to fall for the rest of Obama's tenure, the budget office now projects. By contrast, the deficit for fiscal year 2012 came in at just over $1 trillion.

Three major factors account for most of the long-term improvement - a better economy; a continued slowdown in the rate of medical inflation, which reduces the cost of Medicare and Medicaid; and higher taxes that Congress approved as part of the fiscal-cliff deal in January, the budget office said.

In addition, the automatic budget cuts that took effect this spring have reduced spending in the short term. The government also will benefit this year from dividend payments it is getting from the two giant housing finance agencies bailed out during the financial crisis.

The federal government's annual deficit this year amounts to about 7 percent of the gross domestic product. By 2015, the budget office forecasts the deficit to fall to just over 2 percent of GDP, a level that most economists would consider relatively insignificant. At that point, the deficit would begin slowly to climb again, reaching about 3.5 percent of GDP by the end of the decade.

The report also forecasts that the federal debt will shrink relative to the size of the economy for the rest of Obama's term. The budget office expects the debt to begin to rise slowly after 2018 as an aging population raises the cost of retirement programs.

The federal deficit is the gap between what the government spends each year and its revenue. The government has run a deficit almost every year for the last half century. The federal debt represents the accumulated money that the government borrows to cover that deficit.