The surprise announcement at Comic-Con that Natalie Portman will return for "Thor: Love and Thunder" and become the "female Thor" may have come out of the blue for fans, but it's been in the works for some time.

Despite reports that Portman was totally done with the "Thor" movies, Marvel boss Kevin Feige revealed to Entertainment Tonight that the relationship never ended.

"She’s amazing, she’s always stayed in contact with us," he said.

The Oscar winner played astrophysicist Jane Foster in the first two "Thor" movies, but did not appear in "Ragnarok." Chris Hemsworth's Thor alluded to their romance ending.

Portman's supposed aversion to continuing in the MCU seemed to be disproved when she made a voice cameo in "Avengers: Endgame" (though footage of her was used from "Thor: The Dark World"). She also showed up at the "Endgame" world premiere red carpet.

According to The Hollywood Reporter, Portman cemented the deal to return for "Thor 4" six months ago. But director Taika Waititi came up with the idea way back while filming "Thor: Ragnarok."

"One of the ideas, and perhaps the biggest, was the idea of Jane," Feige said. "We set Natalie and Taika up and in one meeting she agreed to do it."

For all of our San Diego Comic Con coverage, please click here!