How could Loki, a villain who was defeated by a single superhero in “Thor,” become a believably formidable foe for a team of six superheroes backed by S.H.I.E.L.D.? The question plagued Loki actor Tom Hiddleston, 31, when he was preparing for “The Avengers,” out on Blu-ray and DVD Tuesday.

“That was what I was so terrified I would fail to do,” Hiddleston said. “It’s a big old movie.”

Big it certainly is. “The Avengers,” which cost $220 million to make, was a popular and critical hit, earning more than $1.5 billion worldwide and making director Joss Whedon a household name. The film unites a team of A-list muscle men, many of them already stars of their own Marvel movies, including Robert Downey Jr. (“Iron Man” and “Iron Man 2″), Chris Evans (“Captain America”), Chris Hemsworth (“Thor”), Black Widow actress Scarlett Johansson, Jeremy Renner as Hawkeye, Samuel L. Jackson as recurring character Nick Fury and Mark Ruffalo as the Hulk.

Tom Hiddleston attends the premiere of “The Avengers” during the Tribeca Film Festival on April 28 in New York. (Andrew H. Walker / Getty Images)

Initially, Hiddleston — whose previous work included “War Horse,” “Midnight in Paris” and quite a few stage productions — was intimidated by the prospect of being the lone counterweight for a team of good-guy “movie stars,” he said. But once he was in the thick of it, he found his footing.

“All of those actors playing the Avengers are so collaborative. Like the code name for the film was called ‘Group Hug,’ which is so sweet,” Hiddleston said with a chuckle earlier this year. “I wasn’t at all excluded from the group hug. I honestly felt like I was part of the team. I always feel like acting is like playing tennis. It’s not a sport that you can play on your own. And if I’m any good in this film, it’s because I was playing with Scarlett and playing with Robert and playing with the Chrises and Sam Jackson. It’s about what happens in the rally between you.”

The “rally” between actors in “The Avengers” is perhaps at its best between Hiddleston and Hemsworth. The pair began developing their characters’ relationship as foils to each other before 2011’s “Thor” — the bright, brash golden child and the shadowy, silver-tongued second son. They even worked on developing antithetical fighting styles; Hemsworth modeled his moves on boxer Mike Tyson, using his hammer like Tyson uses his fists, Hiddleston said, while Loki’s fighting was more inspired by wushu martial arts and dance choreography. Everything pointed back to Thor’s granite sense of right and wrong and Loki’s more fluid morality.

By the time “The Avengers” rolled around, it was a dance that Hiddleston and Hemsworth knew well.

“That was probably my favorite stuff,” Hemsworth said. “I’d had a relationship with Tom and that character previously. And that was where the most heart and soul in my story was.”

Director Joss Whedon said the actors playing the Asgardian brothers at odds (and at arms) could not have been better cast.

“[Hiddleston] will explore,” Whedon said. “He’ll always want another take. He’ll always want to take it further. It’s interesting to watch him and Chris together, because Chris is much more instinctual, and Tom is very thoughtful. It’s very easy to say, ‘Oh Thor’s a jock,’ and you know, he’s not that. He’s a really thoughtful actor. But he has this athletic thing of, ‘It’s gonna come now. Let’s do this.’ And then Tom’s like, ‘I want to think my way around this.’ And I’m like, ‘You guys are Thor and Loki, man!’ It’s fun, and they enjoy each other so much.”

Hiddleston was known on set for being “enormously kind and gregarious,” Whedon said, and his theater experience made him a good fit for his character.

Tom Hiddleston, left, Robert Downey Jr. and Joss Whedon on the set of “The Avengers.” (Zade Rosenthal / Marvel Studios)

“He’s very different than a lot of the other guys,” Whedon said. “A lot of the actors would come at it from, ‘Let’s do some scene work and shape the script,’ which I’m very comfortable with. Tom, I think possibly with all the Shakespearean training, he takes what he has, and says, ‘Well, how do I make this work,’ and is so gracious about it, and so inventive. I remember that we were doing this scene with Natasha [Romanoff, a.k.a. Black Widow], which is maybe my favorite scene in the movie. I just mentioned to him that he was killing it, and I was lovin’ his work, and all he said was, ‘Mighty words, mighty words.’ And that’s very gratifying.”

Hiddleston said he worked closely with Whedon to shape the character he built with “Thor” director Kenneth Branagh into a villain evil and deadly enough to pose a serious threat to Nick Fury’s super squad.

“Joss and I talked about dialing up the menace and his extraordinary danger, that Loki is an incredibly dangerous, feral, anarchic and chaotic personality,” Hiddleston said. “I just had to go there and try and find a place in my headspace when I went to work that was really nasty — and enjoy it. Joss kept saying, ‘Look, enjoy it. You’ve got it. You look great. The costume’s fantastic. More feral, more dark and enjoy yourself, ’cause Loki’s having a such a good time.'”

A good time, indeed. Loki takes pleasure in executing his plan to enslave the planet, manipulating Earth’s defenders and making a show of his conquest. In “The Avengers,” Loki is no longer just a younger brother with a jealous streak.

“I think every human being is capable of extreme virtue and extreme vice, and most of us live within quite a narrow range on a really broad scale,” Hiddleston said. “The biggest thrill for me about playing big characters is that they exist at the extremity of the scale. And the heroes end up saving the world, and the villains are trying to destroy it. … [Loki] just seems like a lost, damaged soul who was brought up believing in a particular truth, which is that he was entitled to rule. He was a born prince, and that one day he would be a king. And then he finds out that the entire narrative of his life is a lie, that he was adopted by Odin as the neglected, abandoned bastard son of their mortal enemies. And he feels so betrayed and so hurt by that, and that’s a very relatable thing. I think that’s a very easy thing to find the truth of.

“And then what he does, rather than getting some therapy, he gives way to his anger. He gives way to all of the feelings that are conjured up by his pain, basically hate and pride and vanity. It’s motivated by loneliness. His destructiveness is motivated entirely by his spiritual desolation and the fact that he has nowhere to belong. And because he doesn’t belong anywhere, he’s trying to make the earth belong to him. And I hope you can still see that somehow, even though he basically is hateful in this film.”

Hiddleston will reprise the role for next year’s sequel, “Thor: The Dark World,” directed by Alan Taylor (“Game of Thrones”). Will Loki finally find redemption?

“I hope so, I really hope so,” Hiddleston said. “I hope you can see glimmers of it in ‘The Avengers.’ There’s a bit where we’re on the tower and Thor’s like, ‘Look around. You don’t have to do this.’ I think he’s probably going to get a hiding when he goes back home. I think his father’s going to have a few things to say. … Grounded for a long time. I haven’t read a script yet, but I know that we certainly can’t recycle what we’ve done. Loki, I think, has been about as bad as he can be.”