NEW YORK — The U.S. averted a debt default Tuesday when President Barack Obama signed a bill raising the country’s debt ceiling into law. But that might not enough to maintain its coveted AAA debt rating, according to Fitch Ratings.

U.S. debt has held a AAA rating since 1917. Currently, fewer than 20 countries have AAA ratings. Among them: the United Kingdom, Australia, Germany and Singapore.

On Tuesday, Fitch said the agreement to raise the debt ceiling and make spending cuts was an important first step but “not the end of the process.” The rating agency said it wants to see a credible plan to reduce the budget deficit “to a level that would secure the United States’ ‘AAA’ status.”

Moody’s Investors Service also says the United States will retain its triple-A bond rating following passage of legislation to boost the debt ceiling. But the rating agency says it is lowering the outlook for possible future changes to negative.

Moody’s said in a statement the bill signed into law Tuesday had virtually eliminated the risk of a default by the government on its debts.

Moody’s assigned a negative outlook to the triple-A rating to show that there is still be a risk of a downgrade if the government’s fiscal discipline weakens.

Fitch expects to conclude its review of the U.S. debt rating by the end of August. Given the terms of the debt deal signed Tuesday, it is possible the rating could be downgraded at that time, Fitch said.

David Riley, managing director at Fitch, said in an interview with The Associated Press: “There’s more to be done in order to keep the rating in the medium-term.”

The three main ratings agencies that rate debt that is issued by countries, states, corporations and municipalities are Fitch, Moody’s and Standard and Poor’s. Ratings are based on a likelihood of default. The AAA rating is the highest available and signifies an extremely low likelihood of default.

Standard and Poor’s has not released its rating yet.