SOFIA, Bulgaria — Venting anger at President Trump, European leaders said Thursday they would take steps aimed at blunting the effects of the American sanctions he restored on Iran, which could penalize European companies doing business there.

At a European Union summit meeting in Sofia, Jean-Claude Juncker, the president of the European Commission, the bloc’s executive arm, said it would begin a legal process to prohibit companies based in the 28-member union from complying with the American sanctions.

“We should know that the effects of the announced American sanctions will not remain without consequences,” Mr. Juncker said. “We have a duty to protect our European companies.”

The meeting, with leaders of western Balkan countries, came barely a week after Mr. Trump quit the 2015 nuclear agreement between Iran and leading world powers, which has eased sanctions in exchange for verifiable curbs on Iran’s nuclear activities.