Robert Downey Jr. is on the verge of signing on to “Captain America 3,” with Tony Stark’s Iron Man set to play a key role in bringing the Civil War storyline from Marvel’s comicbooks to the bigscreen and trigger the start of a new phase of movies from Marvel Studios.

The actor is in final negotiations to play the billionaire in the yet-to-be-titled third installment, that is slated to begin production in the Spring for a May 6, 2016, release, according to sources close to the discussions. Downey suits up as the superhero in next summer’s “The Avengers: Age of Ultron” as part of a previous deal that also calls for him to reprise the role in “The Avengers 3.”

The new pact is significant for the Marvel cinematic universe considering the plot will pit Stark against Captain America’s alter-ego Steve Rogers, played by Chris Evans, as they feud over the Superhero Registration Act, which forces anyone with superhuman abilities to reveal their identities to the U.S. government and agree to act as a police force for the authorities.

Stark supports the program, but Rogers does not, saying it threatens civil liberties, causing sides to be taken and Rogers, among others, to go on the run to avoid arrest. The moral question and battle with his Avengers teammate essentially makes Stark a villain of sorts in “Captain America 3,” providing Downey with a meaty role he could play out into future Marvel films, including a fourth “Avengers.”

Marvel on Monday announced plans to reboot the Civil War comicbook miniseries in 2015, which will help introduce the story to new readers leading up to “Captain America 3.” The first crossover of Marvel’s biggest characters, including Spider-Man, was published in 2006.

But the deal for Downey to return as Iron Man almost didn’t happen.

Originally, Marvel wanted to hire Downey for a small role, which would have required just three weeks of work. But Downey wanted Stark to have a more substantial role in the film’s plot, which would give him more screen time and naturally a bigger payday. This angered Marvel Entertainment chief Ike Perlmutter, who ordered the screenwriters to write Iron Man out of the script entirely, sources said.

Even though the deal appeared dead, Marvel Studios president Kevin Feige and Downey’s reps at CAA continued talks in hopes of working out their issues. Feige was bent on executing his grand vision for extending the life of the Marvel characters over many years.

The executive needed his boss to see the big picture, considering the introduction of the Civil War story is seen as a way to drive the plots of sequels and new franchises for the next seven years, given the dramatic possibilities it offers for future films. The fallout from the government and Stark’s actions would factor into a new “Avengers 4” film and beyond that will assemble new characters being introduced like Ant-Man and Doctor Strange, among others, in their own movies.

Downey, who earned $50 million for “The Avengers” and a reported $75 million for “Iron Man 3,” will collect around $40 million plus backend participation for “Captain America 3,” said sources, and will receive an additional payout if “Captain America 3” outperforms “Captain America: The Winter Soldier’s” $714 million worldwide haul. Since the actor did not appear in the first two “Captain America” films, the thinking is that if the third installment surpasses the last movie, its success could be attributed to Downey.It’s also worth noting that Evans is clearly a bigger star now, evidenced by the fact that “Captain America: The Winter Soldier” grossed nearly twice as much as “The First Avenger’s”” $371 million in 2011.

Marvel still could have worked around Downey if need be. With the studio having already reworked plots from the comicbooks to fit its bigscreen agenda, it’s certainly feasible that Stark could have been turned into a different character to butt heads with Captain America — the Incredible Hulk’s Bruce Banner, for example. Another option could have been dropping the Civil War plot entirely, which would have required major rewrites.

Downey already has been open about wanting to remain in Marvel’s cinematic universe beyond his current contract that expires after the third “Avengers.” In early September, Downey told Variety in Toronto that currently “there is no plan for a fourth ‘Iron Man.'”

Yet Downey also has been wanting to play a larger role in future films as a way to remain creatively involved and close to his fanbase that would undoubtedly come out to see his non-Marvel movies. However, those fans didn’t show up in droves this past weekend to the actor’s latest picture “The Judge,” which debuted with just $13.3 million.

As for the future of Marvel movies, the Disney-owned studio already has 11 releases dated through 2019, including next summer’s “Avengers: Age of Ultron” and “Ant-Man.”

Anthony and Joe Russo, who directed “Captain America: The Winter Soldier,” will return to helm “Captain America 3.” The brothers are working on the script with Christopher Markus and Stephen McFeely.

While Frank Grillo is expected to return as the villain Crossbones, Anthony Russo told Movies.com last month, “I can’t divulge who is going to be in the film, but I think fans are going to freak out when they hear about it,” clearly hinting at Downey being in the next sequel.

While Downey was instrumental in getting Marvel’s film franchises off the ground with the first “Iron Man” in 2008, the studio has since become a brand strong enough to launch titles that have little built-in audience awareness or major stars doing the heavy lifting — as evidenced by this summer’s mega-hit “Guardians of the Galaxy.” That film earned $687 million worldwide, surpassing “Iron Man 2.”

Marvel has long been known as a tough negotiator — and by some accounts cheap — but the studio hasn’t shied away from giving Downey what he’s asked for in the past. He’s reaped between $250 million and $300 million for the “Iron Man” trilogy, his role in “The Avengers” films, and a brief appearance in “The Incredible Hulk,” according to knowledgeable sources.

Now with “Captain America 3,” it doesn’t look like Downey is ready to hang up Iron Man’s suit anytime soon.

Marvel and CAA declined to comment.