Tehran (AFP) - An ultraconservative Iranian lawmaker hit out Tuesday at reports Foreign Minister Mohammad Javad Zarif shook hands with US President Barack Obama at the UN General Assembly, branding it as unrevolutionary.

The remarks came after Iran's semi-official ISNA news agency and international media outlets documented the impromptu encounter in New York on Monday.

"Dr Zarif was leaving the hall when he accidentally faced Mr Obama and John Kerry, who were about to enter. They briefly greeted each other and the two shook hands," ISNA said, citing a source close to Iran's UN delegation.

Although Kerry, the US Secretary of State, and Zarif shook hands numerous times during talks that ended with a July 14 deal on Iran's nuclear programme, the handshake with Obama would be the first known between a US president and a top Iranian official since the Islamic revolution in 1979.

Despite the nuclear deal, supreme leader Ayatollah Ali Khamenei has said the United States remains the "number one enemy" of the Islamic republic, a statement reiterated by lawmaker Mansour Haghighatpour.

"We hope this news is not confirmed because if Mr Zarif has done such a thing, he has definitely ignored the system's red lines," Haghighatpour was quoted as saying by the Tasnim News Agency.

Haghighatpour is a member of a special committee established by parliament to review the nuclear deal between Iran and six world powers led by the US.

He said the circumstances were not yet right to shake hands with a US president.

"America is still the enemy of the Iranian nation and the US insists on its enmity towards Iran. Therefore, shaking hands with the enemy is contrary to the revolution's principles and against the nation's rights," he said.

In Tehran, the foreign ministry's media office said no meeting was pre-planned with Obama and the encounter was "completely accidental," but it did not deny there was a handshake.