Sherlock Holmes: A Game of Shadows certainly won’t win over those who found the 2009 action film an irredeemable bastardization of a beloved character.

But this sequel offers a welcome reward to those who saw promise in the premise — a brisk, globe-hopping adventure that respects both canon and cannons. And by the end of Shadows, Robert Downey Jr. reveals why he’s perfect for this part, rounding out Holmes into a troubled hero and not simply a charming rogue.

As Shadows opens, Holmes is living on a diet of coffee, tobacco and coca leaves, otherwise consumed by his battle of wills with archenemy Professor Moriarty. (Shadows smartly scuttles the original’s supernatural tones for something more cerebral.) Revealed as the evil mastermind of the original film’s conclusion, Moriarty is every bit the genius as Holmes … save the whole good-guy thing. They’ve been baiting each other with catnip and cheese for months, ensnaring two people in the middle — Dr. Watson (Jude Law), Holmes’ reluctant right-hand man, and Irene Adler (Rachel McAdams), Holmes’ antagonistic love interest and Moriarty’s employee.

Resembling a welterweight Brendan Gleeson, veteran character actor Jared Harris eerily elucidates the detached, cunning and cruel menace expected from Moriarty. Composer Hans Zimmer augments the effect, revisiting the unsettlingly atonal chromatics of The Dark Knight whenever Moriarty lays out his amorality.

It doesn’t take long for Moriarty to definitively elevate the stakes and force Holmes, Watson and Irene out of familiar London environs to foil his endgame. And in doing so, it sets up a story superior to the original — something tougher and riskier.

That’s not to say Shadows doesn’t run over a few cobblestone potholes. Downey and Law hit many similar bromantic beats as before, but one slyly silent exchange and another that burbles with rage offer refreshing changes of pace. Also, in her Hollywood debut, Noomi Rapace (the original Lisbeth Salander from The Girl with the Dragon Tattoo) carries all the energy of a designer handbag. The most Shadows can do with her exotic features is cast her as a gypsy fortuneteller whose family is also caught up in Moriarty’s plan. And after a nifty knife-throwing scene early, she’s largely shuffled off to the sidelines.

Returning director Guy Ritchie unfolds his action at the pace of a Victorian-era Bond movie, easily his best showcase since his Lock, Stock and Two Smoking Barrels debut. A munitions factory sequence is a woolly mix of Western and war movie, and Shadows even has a Q of sorts in Sherlock’s brother Mycroft (splendidly played by Stephen Fry). Only one scene — during which key players sprint in slow motion through a forest like a meathead version of Melancholia — truly rankles.

That bit comes not long after Moriarty’s grand plan is revealed; sadly, it’s the sort of stale, megalomaniacal bid for domination done better in a million other movies. And yet revealing too much about it would ruin some of the surprising places it takes Holmes. It would be easy for Downey to simply fall back on cheeky-douche humor when the going gets tough. Instead, his work here suggests Holmes’ idiosyncrasies ascend from a darker place — his alienating behavior the most reliable defense mechanism against the heightened senses he brands a curse.

Fans of Sir Arthur Conan Doyle’s books will certainly appreciate and anticipate the film’s climactic moments. But even moviegoers whose action jones been sated by then will notice a different Holmes in that scene — battered, bruised and visibly aged by his devil’s dance with Moriarty. By making rougher choices and taking crucial chances that pay off in the resolution, this Game of Shadows isn’t just afoot, it’s affecting.