It took months of training and endless plates of protein to transform former ballerina Alicia Vikander into musclebound action hero Lara Croft for the new "Tomb Raider" film.

The 29-year-old Oscar winner spent seven months working with Swedish trainer and nutritionist Magnus Lygdback, who also helped Gal Gadot and Ben Affleck get into superhero shape for "Wonder Woman" and "Justice League."

This image released by Warner Bros. Pictures shows Alicia Vikander in a scene from "Tomb Raider." It took weeks of training and plates full of protein to turn former ballerina Alicia Vikander into action star Lara Croft. (Graham Bartholomew/Warner Bros. Pictures via AP)

This image released by Warner Bros. Pictures shows Alicia Vikander in a scene from "Tomb Raider." It took weeks of training and plates full of protein to turn former ballerina Alicia Vikander into action star Lara Croft. (Graham Bartholomew/Warner Bros. Pictures via AP)

Lygdback and his team of fitness professionals hosted a boot camp in Los Angeles recently to demonstrate Vikander's "Tomb Raider" training regimen.

"Physically, anyone can train to be a superhero," Lygdback said.

Diet is paramount, even more than physical training, he said. He directs his clients to eat every three hours and avoid sugar and "fast carbs" like white rice and flour.

"You'll see a big change, mentally and physically, just by changing the nutrition," he said.

Vikander spent seven months preparing to become Croft. The first three were just about diet, Lygdback said. His clean-eating plan includes lots of protein and vegetables. A sampling at the "Tomb Raider" boot camp featured broccoli blossoms and seared steak. He says 17 out of 20 meals should be on point, with three splurge meals in the mix.

"I love desserts. I love chocolate. I love a glass of Barolo on a Saturday night," said Lygdback, whose Hercules-shaped form appears to have zero body fat.

Four months ahead of filming, Vikander began working daily with Lygdback for hour-long sessions incorporating martial arts, weight training and movement education to give her a greater command of her body.

The process didn't just pack muscle onto Vikander's slender frame.

"Magnus really helped me transform for the role," she said. "And gain a sense of empowerment."

"Tomb Raider" opens Friday.

This image released by Warner Bros. Pictures shows Alicia Vikander in a scene from "Tomb Raider." It took weeks of training and plates full of protein to turn former ballerina Alicia Vikander into action star Lara Croft. (Ilze Kitshoff/Warner Bros. Pictures via AP)

This image released by Warner Bros. Pictures shows Alicia Vikander in a scene from "Tomb Raider." It took weeks of training and plates full of protein to turn former ballerina Alicia Vikander into action star Lara Croft. (Ilze Kitshoff/Warner Bros. Pictures via AP)

This image released by Warner Bros. Pictures shows Alicia Vikander in a scene from "Tomb Raider." It took weeks of training and plates full of protein to turn former ballerina Alicia Vikander into action star Lara Croft. (Ilze Kitshoff/Warner Bros. Pictures via AP)

This image released by Warner Bros. Pictures shows Alicia Vikander in a scene from "Tomb Raider." It took weeks of training and plates full of protein to turn former ballerina Alicia Vikander into action star Lara Croft. (Ilze Kitshoff/Warner Bros. Pictures via AP)