Paul Bettany plays Vision in Marvel's Cinematic Universe and last appeared in "Avengers: Infinity War."

The story of how he landed the role feels like a movie in itself. Bettany recalled to BBC Radio 1 a meeting he had with a producer who told him he was done in Hollywood.

Then fate intervened.

The actor told INSIDER back in 2015 that as he was sitting on a sidewalk, he received a call from "Avengers: Age of Ultron" director Joss Whedon asking if he wanted to play Vision.

"I sort of looked up to heaven and thought karma's very quick these days ... and [I] flipped the building behind me the finger," he told INSIDER.

Visit INSIDER's homepage for more.

Paul Bettany stars in "Avengers: Infinity War" as the android superhero Vision. After voicing a different character, Tony Stark's AI J.A.R.V.I.S., for several movies in the Marvel Cinematic Universe, it was a role he didn't expect to play at all.

"I had just had a meeting with a producer, who will remain nameless, who told me that my career was over. He said 'You're done, you're done in this town,'" Bettany told BBC Radio 1 of a shouting match he had at the time.

INSIDER spoke with Bettany about how he landed the role of Vision in 2015 during press for "Avengers: Age of Ultron."

Paul Bettany gets to look a little more like himself in "Avengers: Infinity War." Marvel

"I stepped out into Hollywood and I sat on the sidewalk with my feet in the gutter and I thought 'F--- me," Bettany recalled after the meeting with the producer went south.

But then fate intervened for the 46-year-old actor.

"My phone rang and it was ['Age of Ultron' director] Joss Whedon and he said, 'Do you want to play the Vision in the next 'Avengers' movie?'" Bettany said.

He said yes.

"I sort of looked up to heaven and thought karma's very quick these days ... and [I] flipped the building behind me the finger," Bettany said. "It happened just like that. I sat down and my phone rang. Very funny. But you know if I had a dollar for every time somebody told me my career was over, my career could be over."

Read more: 33 important questions 'Avengers: Endgame' needs to answer

In "Infinity War," Thanos (Josh Brolin) was collecting the six Infinity stones to take over the universe. Unfortunately, the location of one of those stones was in Vision's head, keeping him up and running. By the film's end, Thanos ripped the stone out of Vision's head.

The mind stone brought Vision to life. Marvel

Vision wasn't among the characters to disappear after Thanos wiped away half of the universe's existence. Since he's an Android, we're hoping someone (like his maker, Tony Stark) can just fix him to some extent.

Bettany has the honor of being one of few actors to play two characters in Marvel movies. He joins Chris Evans (Human Torch/Captain America), Peter Dinklage (X-Men's Bolivar Trask and a character in "Infinity War"), and actor Josh Brolin who plays the villain in not only "Infinity War," but the antihero Cable in "Deadpool 2" as well.

Read more: Fans think Captain America is the most likely to die in 'Avengers: Endgame,' but they would be the most upset over the loss of Iron Man

You can read our full story from 2015 with Bettany here and follow along with our "Avengers: Endgame" coverage here.

Watch Bettany's interview with BBC Radio 1 below: