As Iran prepares to resume high-stakes nuclear negotiations with six world powers, including the United States, it is striking a typically assertive posture to bolster its negotiating hand.
Tehran vowed last week to continue refining uranium "with intensity", and flexed its military muscle by unveiling a new warship and two turquoise-coloured submarines, all "domestically built".
On the political front, Iran's powerful parliamentary speaker, Ali Larijani - a possible contender in next June's presidential elections - went on a high-profile visit to Syria, Lebanon, Turkey and Iraq.
"Iran is signalling to its regional rivals and the Americans that it has military and diplomatic prowess in the Middle East and must be taken seriously," said Scott Lucas, an Iran expert at Birmingham University in England.
Mr Larijani is a trusted aide of Iran's supreme leader, Ayatollah Ali Khamenei, who recently maintained the Islamic republic's policies in the region and beyond have given it "the upper hand" over its western opponents.
Such chest-thumping comes after Iran, whose support for president Bashar Al Assad's regime in Syria, Iran's closest ally, has eroded Tehran's regional influence, proudly admitted for the first time it had given Hamas military support.
This enabled hardline media in Tehran to claim Iran played a leading role in Hamas's "incredible victory" over the "usurping Zionist regime" last month when Iranian-engineered Fajr rockets "paraded through Tel Aviv skies".
More than 150 Palestinians and six Israelis died in the eight days of fighting between Israel and Gaza's Hamas rulers, that ended in an Egyptian-brokered truce on November 21.
By acknowledging its military support, Tehran hoped to demonstrate it is a stronger defender of the Palestinian cause than Hamas's newer friends in Egypt, Qatar and Turkey. All are Sunni Muslim rivals of Shiite Iran that back the rebellion in Syria.
This rivalry is a boon to Hamas. "It has got weapons from its old allies [Iran] and the money and [diplomatic] support from its new allies," said Abdel Bari Atwan, editor-in-chief of Al Quds Al Arabi, a pan-Arab daily newspaper published in London. By broadcasting its military support for Hamas, Tehran also sent a none-too-subtle message to Barack Obama, the US president.
"It has been Iran's long-standing aim to establish that none of the crises in the region can be resolved without taking Iran into account," said Sir Richard Dalton, a British former ambassador to Tehran and associate at the Chatham House think tank in London. "The Gaza developments were a gift for Iran in that regard."
After his re-election in November, Mr Obama said he would "try to make a push in the coming months" for a dialogue with Iran on its nuclear activities that could include historic bilateral talks.
Tehran, struggling under draconian sanctions, is clearly interested despite Mr Khamenei's mistrust of the US.
"The pro-Khamenei press … has been preparing the public about how, if it's in the interest of the nezaam [political system], the Islamic republic will negotiate with the US," said Muhammad Sahimi, an Iran expert at the University of Southern California.
But Iran is also determined not to negotiate from a position of weakness - and to secure a better deal than it has been offered. An offer in the summer called on Iran to relinquish the most worrying components of its nuclear programme in return for modest incentives that promised little immediate relief from choking sanctions.
"The Islamic republic is making a point that it is part of a variety of problems in the region - from Syria to Gaza - and that making it part of the solution will require a different approach from the US," Farideh Farhi, an Iran expert at the University of Hawaii, wrote on Lobelog, a foreign policy blog.
Nuclear negotiations between Iran and the so-called P5+1 - the UN Security Council's five permanent members - the US, Britain, Russia, China and France, along with Germany - have been deadlocked since June.
Following Mr Obama's re-election, both sides said they wanted to resume talks soon. A new round is expected this month or next.
"Will there be enough in any offer from the P5+1 for Khamenei to be able to negotiate in such a way that he can pronounce victory in the end?" Sir Richard said yesterday in an interview. "I don't think the six have yet prepared their position."
And Iran may be overestimating its negotiating hand. Many US policymakers, despite "trumpeting" the purported threat from Iran for "domestic purposes", remain unimpressed by Tehran's regional influence, Ms Farhi wrote. Either that or they believe Iran is "structurally unable to be helpful in wielding its clout".
Egypt, which controls the Rafah border crossing into southern Gaza, has also highlighted the limits of Tehran's regional influence by withholding permission for Iran's foreign minister, Ali Akbar Salehi, to visit the besieged Palestinian enclave.
"The only way Egypt will let him into Gaza is if Iran ends its support for Assad's regime," Mr Lucas said. "Hamas is also unhappy with Iran's approach."
While Hamas thanked Iran for its support in its recent conflict with Israel, it has also urged Tehran to distance itself from Mr Al Assad, warning that the Islamic republic is alienating Arab public opinion by backing his regime.
This and any suggestion of friction between Tehran and Hamas was ignored by most Iranian media. But Iran's hardline Serat News lambasted Hamas's leaders - who had enjoyed Tehran's "unflinching support" - for ditching Syria.
The contours of a nuclear agreement, meanwhile, have long been visible. The US would have to accept low level uranium enrichment on Iranian soil and gradually lift sanctions. Tehran, which insists its nuclear drive is solely peaceful, must accept curbs on its atomic programme and more intrusive inspections.
There are cautious hopes among many western diplomats and Iranian officials that such an agreement can be clinched because of a rare alignment of circumstances. Mr Obama is committed to a negotiated settlement, insisting military strikes on Iran's nuclear programme are a last resort, while Iran is suffering under crippling sanctions.
The window for diplomacy is small, however. Iran in a few months will be preoccupied by its presidential elections. And Israel, reputed to be the region's sole nuclear-armed power, warns that by spring Tehran will have enough medium-grade uranium to make a dash for the bomb. Tel Aviv has signalled that is a red line that could trigger Israeli strikes against Iran's nuclear facilities.
Iran, Ms Farhi wrote, remains undaunted. Whether or not it is blustering, it stresses that policies which attempt to "bring about regional security" at the expense of Tehran's insecurity are dangerous and doomed to fail.

