Receive the latest entertainment-news updates in your inbox

Marvel has announced James Spader will suit up to play the self-aware machine supervillain Ultron in its highly anticipated "Avengers" sequel, which writer-director Joss Whedon revealed last month at Comic-Con will be called (aptly enough) "Avengers: Age of Ultron."

Top Entertainment Photos

The 53-year-old actor, who charmed tube viewers most recently as Andy's quirky boss in the second-to-last season of "The Office," is no stranger to bad guy roles of course, having played a slew of sleazoids early in his career in such films as "Pretty in Pink," "Less Than Zero" and "Sex, Lies and Videotape."

2013 Celeb Baby Boom

As Ultron, the erstwhile "Boston Legal" star will give Robert Downey Jr.'s Iron Man, Chris Hemsworth's Thor, and Chris Evans' Captain America and the rest of the gang their biggest test yet when, in his lust for power, he decides to drop in on Earth.

The character was created by Anti-Man, aka biophysicist Henry Pym, in the comics. But Whedon has said in an interview with Entertainment Weekly that Pym will not feature in the film incarnation of the bad robot. In fact, the moviemaker dished about plans to do away with a number of Ultron's superpowers in a bid to humanize him.

"I knew right away what I wanted to do with him," Whedon told the magazine. "He's always trying to destroy the Avengers, goddamn it, he's got a bee in his bonnet. He's not a happy guy, which means he's an interesting guy. He's got pain. And the way that manifests is not going to be standard robot stuff."

No doubt, Spader's casting will also help flesh out the character, not to mention give the automaton a healthy dose of rage.

The three-time Emmy winner nearly stole the show in his most recent big-screen appearance, as vote-getting attorney-lobbyist William Bilbo, who helped the president pass the 13th Amendment in last year's hit "Lincoln."

Next up, Spader will play one of the FBI's most wanted fugitives in the NBC series "The Blacklist," premiering on Sept. 23.