TEHRAN, Iran — An Iranian news agency says President Barack Obama and Iran’s foreign minister shook hands when they ran into one another on the sidelines of the UN General Assembly in New York.

Tuesday’s report by the official IRNA agency quotes an unnamed diplomatic official as saying Foreign Minister Mohammad Javad Zarif came upon Obama “accidentally” and the two shook hands.

A White House official confirmed this Tuesday, saying “there was a brief interaction at the luncheon, where they shook hands.” This official spoke on grounds of anonymity because of the sensitivity of the issue.

It represented the first handshake between an American president and Iran’s top diplomat since the 1979 Islamic Revolution ousted a pro-Western monarchy in Iran. The two countries have had no diplomatic relations since then.

Obama and Iranian President Hassan Rouhani spoke over the phone as Rouhani was leaving the UN in 2013 after his presidential debut at the General Assembly.