Standard & Poor’s said late Thursday that it could downgrade the U.S. credit rating as soon as this month, and there is a 50 percent chance it will do so within three months, if Washington fails to come to an agreement over the nation’s debt.

In a statement, S&P indicated a “substantial likelihood” of downgrading the U.S. credit rating, citing a stalemate in Washington over raising the federal limit on borrowing.

S&P managing director John Chambers said in an interview that the downgrade could come by the end of the month if Congress has not voted to raise the $14.3 trillion debt ceiling.

“The positions of the administration and the Republican leadership are still very far apart,” Chambers said. “The tone of the debate has made us wonder whether a compromise can be achieved.”

All three major credit rating agencies have now threatened the United States’ coveted status as the world’s most secure economy. Its AAA rating identifies U.S. Treasury bonds as one of the world’s safest investments — and has helped the nation borrow at extraordinarily cheap rates.

A downgrade would drive up the cost of borrowing and throw into question the global role of the Treasury bond. The Treasury serves as a crucial risk-free place to invest money — and has been a stalwart of stability amid the economic upheaval of the past few years.

S&P earlier warned in April there was a one-third chance of a U.S. downgrade. With its action Thursday night, it is saying it is now more skeptical that political leaders can find a compromise that both raises the debt ceiling and tames the future growth of the debt.

“Despite months of negotiations, the two sides remain at odds on fundamental fiscal policy issues,” S&P said in the statement.

Chambers added in the interview that even if the parties agree to raise the debt ceiling, it may not be enough to avert a downgrade. Chambers said the country must implement a plan to reduce the annual budget deficit by roughly $4 trillion over 10 years, which makes the debt manageable over the long term.

The White House and Congress have discussed a plan that big, but negotiations have more recently centered on a smaller deal, at $2 trillion or less.

“That could still lead to a downgrade,” Chambers said.

“Today’s action by S&P restates what the Obama Administration has said for some time: that Congress must act expeditiously to avoid defaulting on the country’s obligations and to enact a credible deficit reduction plan that commands bipartisan support,” said Jeffrey Goldstein, under secretary for domestic finance at Treasury.

Treasury’s tone was markedly different from what it was in April, with the initial S&P action. At the time, Treasury officials said the credit rating agency underestimated the ability of political leaders to come to an agreement.

Treasury now says leaders must come together by July 22 to get legislation through Congress by Aug. 2, when the government is slated to run out of borrowing authority.

S&P said it still thought the risk that the U.S. government would not pay bond investors because of a failure to raise the debt ceiling “is small, though increasing.” Any default on a debt payment would prompt a downgrade of U.S. debt from AAA to “SD,” or “selective default,” because the expectation would be that the United States would ultimately pay back investors.

If that were to happen, many investors would have to immediately sell their holdings, and many others wouldn’t be able to buy Treasury bonds.

But S&P says that if the government attempts to dramatically cut spending to stay under the debt ceiling while servicing the debt payments, “we think that the effect on consumer sentiment, market confidence, and, thus, economic growth will likely be detrimental and long lasting.”

That, S&P said, could also lead to a downgrade.

The S&P action follows a warning from another large credit ratings agency, Moody’s Investors Service, on Wednesday.

Moody’s put the U.S. government’s credit rating on review for a possible downgrade and said that even a brief failure of the government to pay its bills would mean that the United States’ current credit rating “would likely no longer be appropriate.”