A former CIA technical operations officer who helped rescue six US diplomats from Iran in 1980 and was portrayed by Ben Affleck in the film Argo has died at the age of 78.

A family statement and his literary agent confirmed Antonio “Tony” Mendez died Saturday at an assisted-living centre in Frederick, Maryland.

He had suffered from Parkinson’s disease, according to the statement.

Specialising in covert operations, Mendez helped devise the plan under which six diplomats who were in hiding were disguised as a Canadian film crew so they could board a flight and escape the country amid the Iran hostage crisis.

The daring plot – for years a side note to the 52 people held hostage for 444 days – captured the public’s attention in Argo, which won the 2013 Oscar for best picture.

Mendez, who joined the CIA after getting recruited in 1965, spent his 25-year career working undercover in Cold War battlegrounds, including the Soviet Union.

Working as a “chief of disguise,” Mendez and his workers helped secret agents remain secret through creating false documents and disguises, according to a biography for his first book, The Master of Disguise: My Secret Life in the CIA.

Justice League Photocall – London
Ben Affleck played Tony Mendez in the Oscar-winning film Argo (Matt Crossick/PA)

“Tony Mendez was a true American hero. He was a man of extraordinary grace, decency, humility and kindness,” Affleck tweeted on Saturday.

“He never sought the spotlight for his actions, he merely sought to serve his country.

“I’m so proud to have worked for him and to have told one of his stories.”

The Argo screenplay, based on another memoir by Mr Mendez and also an Oscar winner, was liberally embellished for the big screen.

The six Americans’ passage through the Tehran airport and on to a plane was uneventful, Mr Mendez wrote.

But the movie portrayed a white-knuckle take-off, with Iranian assault teams racing behind the jet down the runway.

Born in Nevada, Mr Mendez moved to Colorado at age 14, attended the University of Colorado and worked for Martin Marietta on the Titan intercontinental missile, according to the online biography .

He was recruited for the CIA in Denver through a blind ad.

In less than two years, the biography says, he and his family had moved overseas while Mr Mendez worked in south and south-east Asia.

His wife, Jonna, is also a former chief of disguise in the CIA’s Office of Technical Service.

The two wrote a book about their agency work in Moscow in the final days of the Cold War and their romance, which led to their marriage after he retired in 1990. Mr Mendez was also an accomplished painter.

His family says he will be buried in a private ceremony at the family graveyard in Nevada.