The Trump administration is preparing to levy new sanctions on Iran, U.S. officials say, in the first punitive action since the White House put Iran "on notice" after it test-fired a ballistic missile.

Up to two dozen Iranian individuals, companies and possibly government agencies could be penalized as part of the move, expected as early as Friday, said the officials and others with knowledge of the decision.

The individuals weren't authorized to discuss the unannounced sanctions publicly and insisted on anonymity.

The sanctions, coming in the first weeks of President Donald Trump's term, reflect his administration's desire to take a strong stance toward Iran from the start. Throughout his campaign, Trump accused the Obama administration of being insufficiently tough on Iran and vowed to crack down if elected.

The White House and the State Department declined to comment Thursday. Trump took to Twitter early Friday, saying Iran is "playing with fire."

Donald Trump tweet

It was unclear exactly which entities would be sanctioned. Many sanctions on Iran that had been imposed in response to its nuclear program were lifted in the final years of the Obama administration as part of the nuclear deal the U.S. and world powers brokered. Some of those penalties could be re-imposed under separate sanction authorities unrelated to nuclear issues.

That prospect raises the possibility of a fresh confrontation between the U.S. and Iran, which has forcefully argued that it considers any new sanctions a violation of the nuclear deal. The U.S. has maintained that it retains the right to sanction Iran for other behavior such as supporting terrorism.

"This is fully consistent with the Obama administration's commitment to Congress that the nuclear deal does not preclude the use of non-nuclear sanctions," said Mark Dubowitz, CEO of the Foundation for Defense of Democracies, which advocates for a hard-line U.S. position on Iran.

The impending sanctions come the same week that Trump and his aides issued cryptic warnings about potential retaliation against Tehran for testing a ballistic missile and for supporting Shiite rebels in Yemen known as the Houthis. The U.S. accuses Iran of arming and financing the rebels, who this week claimed a successful missile strike against a warship belonging to a Saudi-led coalition fighting to reinstall Yemen's internationally recognized government. Iran denies arming the Houthis.

"As of today, we are officially putting Iran on notice," said Trump's national security adviser, Michael Flynn.

U.S. lawmakers from both parties have encouraged Trump not to let the missile test go unpunished. On Thursday, the top Democrat and Republican on the Senate Foreign Relations Committee joined more than a dozen other lawmakers to urge Trump to act.

"Iranian leaders must feel sufficient pressure to cease deeply destabilizing activities," the lawmakers wrote.

Iran has reacted angrily to the threats of retaliation. Ali-Akbar Velayati, foreign adviser to Ayatollah Ali Khamenei, Iran's supreme leader, predicted this week that "the U.S. will be the final loser."

"It is not for the first time that a naive person from the U.S. poses threats to Iran," Velayati said, according to Iran's state-run IRNA news agency.

Though Trump has long derided the nuclear deal, under which Iran agreed to roll back its nuclear program in exchange for sanctions relief, recently he has avoided repeating his campaign pledge to renegotiate it. Iran has insisted the deal won't be re-opened, and the other world powers that negotiated it with the U.S. have little appetite for revising it.

The Trump administration, like the Obama administration before it, has stated that Iran's ballistic missile testing doesn't violate the nuclear deal itself. But as part of the final negotiations for that deal, Iran agreed to an eight-year extension of a U.N. ban on ballistic missile development.

The U.N. Security Council later endorsed the agreement, calling on Iran not to carry out such tests. But Iran has flouted the prohibition regularly in the past year-and-a-half, drawing sanctions from the U.S. but also diplomatic cover from Russia.

—CNBC contributed to this report.