The Iranian man who inspired the events behind the 2004 Steven Spielberg film “The Terminal” died Saturday in the Paris airport where he lived for nearly 20 years, officials said.

Mehran Karimi Nasseri died at Charles de Gaulle Airport, his home for 18 years, from a heart attack in the airport’s Terminal 2F around midday, according to an official with the Paris airport authority.

Emergency services treated him at the scene but were unable to save him, an official said.

FILE - Merhan Karimi Nasseri sits among his belongings at Terminal 1 of Roissy Charles De Gaulle Airport, north of Paris on Aug. 11, 2004 . 

FILE – Merhan Karimi Nasseri sits among his belongings at Terminal 1 of Roissy Charles De Gaulle Airport, north of Paris on Aug. 11, 2004 .  (AP Photo/Michel Euler, File)

Nasseri’s life was the inspiration behind the American comedy, which starred Tom Hanks as Viktor Navorski, a man from the fictitious Eastern European country of Krakozhia who becomes stranded and is forced to live in the JFK airport.

RADICAL CLIMATE PROTESTERS IN PORTUGAL STORM BUILDING, URGE ECONOMY MINISTER TO RESIGN

The real person behind the fictional story lived in the Paris airport’s Terminal 1 from 1988 until 2006, initially as the result of an unsuccessful deportation-turned-legal limbo.

He later stayed by apparent choice.

As the years passed, Nasseri became a celebrity of sorts, sleeping on a red plastic bench, making friends with airport workers, showering in staff facilities, and reading magazines.

“Eventually, I will leave the airport,” he told The Associated Press in 1999. “But I am still waiting for a passport or transit visa.”

A traveler walks in the Terminal 2 corridors of the Roissy-Charles de Gaulle airport, in the northeastern outskirts of Paris, on September 16, 2022. 

A traveler walks in the Terminal 2 corridors of the Roissy-Charles de Gaulle airport, in the northeastern outskirts of Paris, on September 16, 2022.  (JULIEN DE ROSA/AFP via Getty Images)

Born in 1945 in Soleiman, Nasseri left Iran to study in England in 1974. He was imprisoned when he returned home, he said, for protesting against the shah.

He was subsequently expelled without a passport.

COP27: THOUSANDS OF GLOBAL DIPLOMATS TO DESCEND UPON RITZY RESORT TOWN IN EGYPT TO SOLVE GLOBAL WARMING

His legal woes grew when he applied for asylum in and was granted it by the UNHCR in Belgium, but he said the refugee certificate was stolen at a Paris train station.

Nasseri was then arrested by French police and faced deportation, but lacked official documents.

He was then sent to Charles de Gaulle in August 1988, where he stayed.

This photograph taken on September 16, 2022, shows travellers looking at the departure information panel of the Terminal 2 of the Roissy-Charles de Gaulle airport. 

This photograph taken on September 16, 2022, shows travellers looking at the departure information panel of the Terminal 2 of the Roissy-Charles de Gaulle airport.  (JULIEN DE ROSA/AFP via Getty Images)

European immigration laws became more strict over the years preventing any salvation from his legal situation. But, he eventually received his refugee papers.

When confronted with the reality he may have to depart the airport he had grown to enjoy as his new home, he reportedly refused to sign them.

Nasseri was hospitalized in 2006, and later moved into a Paris shelter.

CLICK HERE TO GET THE FOX NEWS APP

In the weeks before his death, Nasseri had been again living at Charles de Gaulle, the airport official said.

His story loosely inspired Spielberg as well as a French film, “Lost in Transit,” and an opera called “Flight.”

The Associated Press contributed to this report.

By Umiddoc