US President Donald Trump is struggling to extract the United States from a war that he started almost six months ago – alternating between claims that Tehran is “begging” for a deal, and threats to renew military attacks.

Now Iran’s hardline leadership is devising and promoting its own strategy for continued confrontation with Washington.

The strategy emphasizes “offensive operations” as well as defensive action to neutralize enemy threats, according to one Iranian official.

The more assertive stance comes as a US-Iran agreement intended to end the war, the Memorandum of Understanding , expires with control of the Strait of Hormuz still in dispute.

Iran’s military leaders believe they are in a strong position to extract concessions from the US and can further adapt Iran’s weapons systems to bridge the gap with their more powerful adversaries, according to analysts.

It also likely means greater mobilization of Iran’s allies in Yemen, Iraq and elsewhere. In recent weeks, Houthi militants in Yemen have threatened Saudi shipping and struck Saudi oil refineries, while Iranian-backed militia in Iraq have targeted Saudi oil infrastructure.

The starting gun for the new posture in Tehran sounded with decrees reorganizing Iran’s security leadership last week issued in the name of Supreme Leader Mojtaba Khamenei .

An adviser to Khamanei, Mohammad Mokhber, said the “ strategy of shifting the war to an offensive posture if Iran’s conditions are not met will undoubtedly transform the balance of power in the world.”

The new head of Iran’s Supreme National Security Council, Mohsen Rezaie, belongs to a faction of the Islamic Revolutionary Guards Corps (IRGC) that believes “the only way to get concessions from the US is the continuation of fighting, exerting pressure on the US and a steady dose of pain on Donald Trump,” Sina Azodi, assistant professor of Middle East politics at George Washington University, told CNN earlier this month.

In confirming Ahmad Vahidi as the IRGC’s chief, Mojtaba’s decree spoke of the need to increase preparedness for “strong offensive operations against the enemy.”

It was “clear that Vahidi’s mandate was to revise Iranian military strategy in a more assertive and offensive direction,” according to Hamidreza Azizi at the Clingendael Institute, a Dutch think tank.

Days after that decree was issued, a senior IRGC official – political deputy Brig. Gen. Yadollah Javani – told Iran’s semi-official news agency Fars that “Iran’s actions are defensive, although they may also take on an offensive aspect in the future.”

The IRGC is developing the ability to carry out operations “on enemy soil,” said another adviser to Vahidi, Mohammad Reza Naqdi.

“We need to be able to move the operations to the enemy’s soil, whenever this is needed and ordered,” he told state broadcaster IRIB. The IRGC was tasked with being able to “launch attacks against the enemy in an intelligent, selective , and targeted manner.”

This would imply again targeting US military facilities in the region. A new generation of more maneuverable ballistic missiles with cluster warheads , plus innovative use of drones, indicates Iran has adapted tactics rapidly over recent months.

“The regime has withstood the US/Israeli barrage and retaliation from the Gulf Arab states, and they are still standing,” according to H.A. Hellyer, senior associate fellow at the Royal United Services Institute in London.

“Now they seek to transform this resilience into permanent political advantage in the region as opposed to letting the initiative waste away over time,” Hellyer told CNN.

“Tehran believes it has the military edge and is openly discussing going on the offensive instead of merely responding to American attacks,” says Trita Parsi at the Quincy Institute for Responsible Statecraft.

“By that, Iran will not only have wrested control of the scope and geography of the war from the US, but also its timing.”

Iran is preparing for short and long-term scenarios, Azizi believes. The current no-war-no-peace situation – with deepening economic problems – “may prompt the Iranian leadership to escalate in order to push Trump either to remove the naval blockade or to agree to an arrangement on terms more favorable to Iran,” he said.

“The Iranian leadership may conclude that the costs of entering another war are lower than the costs of the gradual erosion of its capabilities under the dual pressure of sanctions and the blockade,” Azizi added.

One part of this offensive doctrine is the persistent but unpredictable attacks on tankers leaving the Gulf – so as to keep oil prices high. Several operated by the United Arab Emirates’ state oil firm ADNOC have been targeted in recent weeks.

IRGC officials have openly talked about sabotaging the many undersea cables running through the Gulf – another form of asymmetrical warfare.

In the longer-term there may be a shift in Iranian priorities away from the axis of resistance that to an extent relied on non-state groups such as Hezbollah, the Houthis and allied militia in Iraq.

“That element is becoming somewhat secondary to Iran’s own missile and drone capabilities, and with the greater confidence that Iranian commanders and leaders have gained during the war, signs of a shift toward a pre-emptive approach have already become clear,” Azizi said.

That’s not to say that Tehran is going to abandon its proxies – far from it.

Iranian state media dutifully report the movements and utterances of most senior officials. But they ignored the visit to Iraq last week of the commander of overseas operations for the Islamic Revolutionary Guards Corps (IRGC).

Quds Force commander Esmail Qaani arrived in Baghdad just as the new government, under US pressure, began moves to disarm Iranian-backed militia and integrate them into the regular army.

Iraq is at the center of the regional tussle between Iran and the US. Iran has had substantial influence there since the overthrow of Saddam Hussein in 2003.

Iran is unlikely to give up the leverage offered by having proxies spread across the region, even if some of them have been degraded by Israel or lost a foothold thanks to regime change, as is the case in Syria.

Saudi Arabia could find itself surrounded on three sides if Iran and its regional proxies all went on the offensive. Iran remains heavily invested in providing the Houthis with expertise and intelligence, according to a Gulf source, while in turn the Houthis provide advice to Iraqi militia.

But the main thrust of Iran’s revamped military leadership is to build a more agile war machine with a centralized command – and develop its missile and drone capabilities.

“This major transformation in our defense sector is necessitated by current circumstances, so that we do not remain limited merely to preserving ourselves,” said Naqdi, the senior adviser to Vahidi.

The regime feels it has the wind at its back.

“They haven’t formalized control over the Strait of Hormuz, and while they are not in a rush, they want to press their advantage,” Hellyer told CNN.

“The declaration of a more offensive posture is directed at their Gulf neighbors, the US and a domestic audience,” he added. “It’s an expression of confidence that is as much psychological as demonstrating military intent.”

CNN’s Aida Karimi contributed to this report.