Members of Iran's elite Islamic Revolutionary Guards Corps (IRGC) are in Syria providing non-military assistance and Iran may get involved militarily if Syria comes under attack, its commander said on Sunday.
The statement is the first official acknowledgement from a senior military commander that Iran has a military presence on the ground in Syria.
Western countries and Syrian opposition groups have accused Iran of providing weapons and expertise to Syrian armed forces and have suspected an Iranian military presence inside the country. Iran has denied this.
The Islamic Republic has backed President Bashar al-Assad since the crisis began.
"A number of members of the Qods Force are present in Syria but this does not constitute a military presence," commander-in-chief of the IRGC Mohammad Ali Jafari said at a news conference on Sunday, Iranian news agency ISNA reported.
Qods is an IRGC unit set up to export Iran's ideology. It has been accused of plotting attacks inside Iraq since the overthrow of Saddam Hussein.
Jafari did not indicate how many members were in Syria but said they were providing "intellectual and advisory help".
"The IRGC is giving intellectual help and even financial assistance but there is no military presence," he said.
He also said that Iran would change its policy and offer military backing to Assad if Syria came under attack.
"I say specifically that if Syria came under military attack, Iran would also give military support but it ... totally depends on the circumstances," he said.
Iranian officials have said Tehran has supplied medical and humanitarian relief to Damascus but have denied all allegations of military involvement.
'Iran will hit Hormuz, US bases, Israel if attacked'
General Jafari also warned of retaliation against the Strait of Hormuz, US bases in the Middle East and Israel if his country was to be attacked.
Jafari also said that he believed Iran would abandon the nuclear Non-Proliferation Treaty should it be targeted for military action.
Jafari said the Strait of Hormuz would be a legitimate target for Iran should it be attacked.
"This is a declared policy by Iran that if war occurs in the region and the Islamic republic is involved, it is natural that the Strait of Hormuz as well as the energy (market) will face difficulties," he said.
Jafari suggested that US military bases would also be fair game for retaliation by Iranian missiles or proxy forces.
"The US has many vulnerabilities around Iran, and its bases are within the range of the Guards' missiles. We have other capabilities as well, particularly when it comes to the support of Muslims for the Islamic republic," he said.
He added that Tehran believed Israel was unsuccessfully trying to push the United States to take part in military action against Iran's nuclear facilities.
"I do not think the attack would be carried out without US permission," he said.
However if Israeli jets or missiles did strike Iran, "nothing of Israel will be left, considering its size," he warned.
"I do not think any part of Israel will be untouched given our missile capabilities. Thus, our response (warning of annihilatory retaliation) is in itself a deterrent."
Jafari said that his personal opinion was that, in case of attack, Iran would leave the NPT which is meant to prevent states developing nuclear weapons while permitting atomic energy generation.
"In case of an attack, Iran's obligations will change. My assessment is that Iran may leave the NPT -- but it would not mean a dash towards a nuclear bomb because we have a religious edict from the supreme leader" against atomic weapons, he said.