The U.S. federal government is nearing its $31.4 trillion borrowing limit, which means a high-stakes fight to raise the debt ceiling is coming.

The Peter J. Peterson Foundation estimates the U.S. national debt at $31.39 trillion, just below the limit set more than a year ago, as of Wednesday.

That doesn't mean the debt ceiling will have to be raised this week or even this month. The Treasury Department can usually use so-called emergency measures to delay a real debt crisis, The Hill writes.

But it's clear that a fight is just around the corner, putting the White House on a collision course with a new majority in the House of Representatives demanding significant discretionary spending cuts in exchange for any increase in the debt ceiling.

The Committee for a Responsible Federal Budget estimates that the emergency measures used by the Treasury Department are generating cash to help the government pay off its debts, including ending contributions to the pension fund and early repayment of Treasury bonds, which could end sometime in July. That means Congress will have to act by mid-summer at the latest to prevent the government from defaulting on its debt.

Approaching the so-called X-date comes with risks. After the debt ceiling fight in 2011 between Republicans and then-President Obama, S&P downgraded the country's long-term credit rating.