President Obama, Iran's Foreign Minister Shake Hands at UN

The gesture is a first between a U.S. president and Iran's top diplomat.

The exchange was first revealed by Iran's official news agency, which reported Zarif came upon Obama "accidentally" and the two shook hands, according to the Associated Press. A White House official also described the encounter as "less than 60 seconds" and noted "it was a chance encounter."

The handshake is the first between an American president and Iran's top diplomat since the 1979 Islamic Revolution.

While the two counties do not have diplomatic relations, there is increased speculation that a prisoner swap may be in the works. Three U.S. citizens are imprisoned in Iran while another is missing.

Get real-time updates as this story unfolds. To start, just "star" this story in ABC News' phone app. Download ABC News for iPhone here or ABC News for Android here.