The U.S. military carried out a cyberattack against Iran last Thursday even as President Trump nixed plans for airstrikes in response to the downing of an American drone, officials confirmed to Fox News.

Sources said U.S. Cyber Command launched the cyberattack targeting the Iranian intelligence and radar installations used to down the U.S. Navy drone last week.

TRUMP LIFTS CURTAIN ON CALL TO NIX IRAN MILITARY STRIKE

Fox News has learned Iran shut off some of its military radar sites around the time the U.S. was poised to launch retaliatory strikes. It's not clear if those radar sites were turned off by the cyberattack or if Iran shut them off deliberately in anticipation of this.

Yahoo! News first reported on the retaliatory cyber strike. It came as the White House and Pentagon were also considering military strikes, but President Trump revealed last Friday that he called them off after learning up to 150 Iranians could be killed.

“I stopped it, not ... proportionate to shooting down an unmanned drone,” he tweeted at the time.

Yet the administration has pushed back on any suggestions that the decision to do so could embolden Iran further. On a visit to Israel Sunday, Trump’s national security adviser had a blunt warning for the regime.

"Neither Iran nor any other hostile actor should mistake U.S. prudence and discretion for weakness,” John Bolton said. “No one has granted them a hunting license in the Middle East.”

With the U.S. having launched a cyberattack instead, tensions remain high even as Iranian forces were quiet over the weekend, officials told Fox News.

For its part, Tehran claimed no successful cyberattack against its assets was carried out.

Amid these tensions, Secretary of State Mike Pompeo has arrived in Saudi Arabia--Iran's biggest rival—as part a hastily organized trip to meet Saudi King Salman.

2020 DEMS WON'T CREDIT TRUMP FOR BLOCKING IRAN STRIKE

The drone shoot-down was only the latest flare-up in the region tied to Iran.

In recent weeks, six oil tankers have been attacked in the Gulf of Oman, which the U.S. and its Gulf allies blame on Iran. The Trump administration is expected to announce more sanctions on Iran later Monday.

At the Pentagon, new Acting Defense Secretary Mark Esper arrived for his first day on the job early Monday morning.  The former Army secretary took no questions.

Warships from the USS Abraham Lincoln strike group remain in the region, along with 70,000 U.S. troops including Air Force bombers and fighter jets.