The Trump administration issued a stark warning to the United States’ closest European allies on Tuesday, promising to sharply penalize European governments or companies that continue to do business with Iran.

“We do not intend to allow our sanctions to be evaded by Europe or anybody else,” John R. Bolton, the national security adviser, said in a speech Tuesday at a forum sponsored by a group intensely critical of the Iran nuclear accord.

Mr. Bolton promised “terrible consequences” for anyone who continues to do business with Iran after Nov. 4, the day the United States will reinstate the remaining sanctions it had lifted under the deal.

Many European countries, including Britain, France and Germany, have announced their intention to continue doing business with Iran. The European Union has passed a law forbidding European companies from complying with American sanctions.