TOKYO — Standard & Poor’s, the credit ratings agency, downgraded Japan’s long-term sovereign debt on Thursday, a sharp reminder of the heavy burden plaguing the world’s third-largest economy at levels that stand out even in an increasingly debt-ridden world.

S.& P. lowered its sovereign credit rating for Japan to AA- from AA. That is three levels below the highest possible rating, and S.& P.’s first downgrade of Japanese government debt since 2002. With the lower grade, Japan’s debt rating is now on par with China’s, which last year overtook Japan as the world’s second-largest economy, after the United States.

S.& P.’s move came just weeks after both it and its rival ratings agency, Moody’s, cautioned that they might take a more negative stance on the United States. It highlighted just how deeply indebted many of the world’s developed economies remain — despite concerted efforts on the parts of governments to improve their balance sheets.

But by size, Japan’s ballooning deficit is an anomaly. Japan’s liabilities will hit 204 percent of its gross domestic product this year, overshadowing even the 137 percent for beleaguered Greece, according to figures from the Organization for Economic Cooperation and Development.