Finally, some good news: The federal deficit is falling — and sharply so.

President Barack Obama’s defenders (there still are some) point out that encouraging trend is occurring on his watch.

Fair enough. The president does deserve partial credit for this decline: The Congressional Budget Office’s revised projection of the shortfall for fiscal year 2013, which ends on Sept. 30, is $642 billion. That’s significantly lower than the February estimate of $845 billion — and lower still than last year’s deficit of $1.087 trillion.

Unfortunately, though, the CBO doesn’t see this dwindling-deficit pattern lasting beyond a few years. Any notion that our nation’s overriding debt problem has been solved is a dangerous illusion.

Still, those who have sounded the alarm over four straight trillion-dollar deficits under this president can feel some relief that the red-ink flow has slowed for now.

And the deficit wouldn’t be on a downward path if the economy wasn’t moving upward. Tax revenues from individuals and businesses have increased — in part because of the improving economy and in part because of the tax hike imposed as part of the year-ending “fiscal cliff” deal.

Plus, though unemployment remains painfully high, there’s even been a bit of mildly encouraging news on the jobs front over the past two months.

However, the deficit’s descent isn’t merely the result of Washington taking in more money.

It’s the result of the federal government finally exercising at least a little fiscal restraint.

To his credit, President Obama did suggest — and sign — the “sequester” provision of the 2011 debt-ceiling deal.

Though he has since decried the arbitrary appropriations cuts that began in March, those spending reductions have contributed to the deficit reduction.

But the CBO also points out that over the next decade Medicare and Social Security costs will continue to soar due to inexorable demographics as more baby boomers reach retirement age. By 2023, Social Security and government health-care spending combined are on track to consume half of the federal budget.

The CBO predicts that despite the expected short-term deficit reduction, the federal debt would remain at more than 70 percent of our nation’s GDP — nearly double the average level (39 percent) of the last 40 years. Citing that figure, the CBO warned: “Such high and rising debt later in the coming decade would have serious negative consequences.”

That makes it imperative for our elected officials to make long-overdue tough decisions required to get our fiscal house in order — including fundamentally reforming federal entitlement programs.

Meanwhile, though a $642 billion deficit would be the fifth highest in U.S. history, it would be our lowest since 2008.

And though the sequester isn’t the most judicious way to exercise fiscal restraint, it is refreshing — and instructive — to see federal spending cuts help reduce the deficit.