) -- The United States may have much less to celebrate this Independence Day.

Credit rating agency

Moody's Investor Services

said Thursday that unless a deal is reached in the next several weeks regarding the debt ceiling, that the U.S. government's "Aaa" rating will be placed on review "due to the very small but rising risk of a short-lived default."

Moody's said that a downgrade could come as soon as July, and that despite earlier confidence, credit analysts had been caught off guard by the polarization in Washington regarding the debt-ceiling issue.

TheStreet Recommends

"Although Moody's fully expected political wrangling prior to an increase in the statutory debt limit, the degree of entrenchment into conflicting positions has exceeded expectations," the firm said.

The U.S. government passed it debt ceiling of $14.294 trillion on May 17 and will eventually default on payments to outstanding bonds unless Congress and the administration reach an agreement by Aug. 2.

Moody's warned that although the Aug. 2 is technical default, if "progress in negotiations is not evident by the middle of July" that a review and movement towards downgrade are likely. The agency added that if a "debt-ceiling-related default did occur that U.S. debt could be cut on notch, to Aa, fairly quickly." They added, however, "any loss to bondholders would likely be minimal or non-existent, as Moody's anticipates that a default would be cured quickly."

Finally, if a default is avoided Moody's said that it would affirm the U.S. crediting rating after a review but warned that whether it remained "stable" depends on Congress' progress towards finding a long term solution.

"Whether the outlook on the rating would be stable or negative would depend upon whether the outcome of the negotiations included meaningful progress toward substantial and credible long-term deficit reduction," Moody's said.

In April Standard & Poor's

downgraded its long-term ratings outlook on U.S. sovereign debt , citing worries about the country's mounting budget deficits.