PARIS — European officials scrambled on Wednesday to prevent the debt crisis in Greece from destabilizing their currency union, threatening credit-rating agencies with possible retaliation after the decision on Tuesday by Moody’s Investors Service to downgrade Portugal’s debt to junk status. The move raised fears that Spain and Italy might soon find themselves in the line of fire, too.

The downgrade included a warning that Portugal, like Greece, might need a second bailout, pushing European stock markets lower on Wednesday and adding to the woes of Ireland, Spain and Italy as traders dumped their bonds, forcing their interest rates up.

Portuguese and European officials condemned the ratings agencies for intensifying the euro crisis, suggesting they were overreacting after they were admonished for moving too slowly to warn of problems in the United States. The move by Moody’s added “another speculative element to the situation,” said José Manuel Barroso, the president of the European Commission.

With both Standard & Poor’s and Moody’s making it more difficult for policy makers handling the bailouts of Greece, Portugal and Ireland, the European commissioner for financial regulation said the credit-rating agencies needed to tread carefully.