Antonio Banderas has a new lease on life.

The 59-year-old actor appeared on “Jimmy Kimmel Live!” Thursday night and opened up about how close he might have come to death had it not been for his longtime girlfriend, model Nicole Kimpel, who sprung into action when the “Puss in Boots” star suffered a heart attack in January 2017.

"I was living life in a not nice way. I'm not a drinker. I was a smoker, which was probably one of the most stupid things I have ever done in my whole life," Banderas explained to Kimmel about his life habits prior to his heart attack. "I was very lucky, after all."

ANTONIO BANDERAS CALLS EX-WIFE, MELANIE GRIFFITH, ONE OF HIS 'BEST FRIENDS'

Antonio Banderas and Nicole Kimpel pose at the screening of "The 33" during AFI Fest 2015 in Hollywood, Calif.

Antonio Banderas and Nicole Kimpel pose at the screening of "The 33" during AFI Fest 2015 in Hollywood, Calif. (Reuters)

The “Desperado” actor told an eerie tale of circumstances that led Kimpel to the drug store where she had been picking up over-the-counter medication for a minor ailment she was dealing with at the time.

"The night before that I had this event, my girlfriend, she had a headache and we didn't have anything in the house. So she went out to buy something, a painkiller or whatever," Banderas recalled. "She bought this aspirin, which is the only thing that she found and she found the maximum one, I think it was five milligrams."

ANTONIO BANDERAS RERCALLS MADONNA PURSUING HIM WHILE HE WAS MARRIED: 'I COULDN'T BELIEVE IT'

Banderas maintained that it was this bottle of aspirin that saved the multiple-time Golden Globe nominee’s life when he endured his heart attack the following day.

"The next morning, when I started having the symptoms and I clearly knew what was going on, she put one of those aspirins inside of my tongue and that saved my life," said Banderas. "So I had a second chance, and some stuff changed in my life, since then."

Following the life-threatening event, Banderas said he has altered his mindset and priorities and places more emphasis on enjoying the time he might have taken for granted in the past.

CLICK HERE TO GET THE FOX NEWS APP

"Things that I gave a lot of importance to stopped being important," he said. "You put attention to the real things. My daughter is the real thing, my friends, my family, and my vocation as an actor. In a way, this is very, it's probably stupid to say this, but it's probably one of the best things that happened in my life."