Bob uses Cold-Blooded Torture against Ahmed in a scene that seems to almost even have creepily fetishy overtones. Everything from the narrative to the resolution of the story makes it clear that Bob was not only doing the right thing but that Ahmed was at the very best an Asshole Victim, if not a clear and present danger from whom only Bob's torture saved the day.
Bob is a police detective investigating Carl, an alleged Pedophile Priest. Instead of arresting him, he drives him to his home and keeps him in his basement, torturing and raping him repeatedly to "show him how those kids felt." The narrative of the story depicts this as "real justice" in some way or another, and props Bob up as a Cowboy Cop revenge fantasy hero who did what the legal system could not.
Bob is a general overseeing an army which happily, frequently, and openly uses Cold-Blooded Torture (and everything else on A Tortured Index) and rapes as a weapon of war. He sees nothing wrong with this, does nothing to control his soldiers, and even endorses the widespread torture and rape as "necessary." The narrative of the story depicts him and his nation as the Knight in Shining Armor and the white side of Black and White Morality.
The entire manga The Sword Of Pain consists of Bob taking cases the legitimate legal system cannot or will not touch and resolving them... via sadistic torture and his Gag Penis.
Alternately, the torture is real, serious Cold-Blooded Torture or rape or the like, but Bob is portrayed as a Torture Technician or any of the flavors of Anti-Hero, and any in-universe praise of his torture is muted or understated at best.
Justified: Bob lives in a society where the legal system has completely broken down and is the closest thing to a legitimate authority, and torture was used by the government before everything collapsed anyway.
Alice, Bob's partner, discovers he's taken the Pedophile Priest to somewhere other than the police station. She reports this to Internal Affairs and to the captain, and goes to investigate herself. Bob is arrested for rape, aggravated assault, attempted murder, and more, and Carl is taken to the hospital for treatment and either properly arrested or released if there was no evidence. Alice and/or maybe even thePedophile Priest is hailed as The Hero for uncovering Bob as the Rabid Cop torturing people, and for testifying against him. Bonus points if He Who Fights Monsters is invoked.
Bob takes Ahmed to what looks like a waterboarding room, then whispers "I'm not going to do this, but pretend you're terrified and in a lot of pain so I don't get fired." He does this with every alleged terrorist he's asked to torture, finding a way to make it look like he tortures them for his superiors when he actually lends a sympathetic ear and tries to find out who's really a hardcore terrorist and who's really just misled/stupid/uninvolved/etcetera, and the story celebrates him for being a Guile Hero and Military Maverick who actually does better at getting valuable information than the real torturers do.
But then Bob does torture some of the alleged terrorists brought to him - only the ones he's sure aren't innocent or of some sort of diminished capacity and who he's sure were directly involved in terrorism - and this is praised in the story and he is The Hero for doing it, just as he is for letting the less culpable escape torture.
The story is about Exalted Torturer characters whining about why everyone considers them the Dirty Cop and Rabid Cop, war criminals, and the lowest scum of society, among the other opinions people who don't support torture have of such. It's titled "We Were Just Doing Our Jobs..."
Zig Zagged: Bob tortures one person (who is an Asshole Victim at best) and is celebrated as The Hero and his torture is heroic. Then, he tortures someone else or several other people, who turn out to be innocent - and is knocked down to Anti-Hero and Rabid Cop status having been seen as Jumping Off the Slippery Slope. Then, he's brought back to the police department or recruited by a Private Military Contractor to find and get information from a dangerous, violent person using "any means possible," and this is portrayed as a redemptive, heroic mission.
Torture in any form is not a part of the story or setting.
People who commit torture in the course of the story or setting are portrayed as the Torture Technician at best.
If Black and White Morality is the setting, this trope is averted when those who would use torture are always on the darkest part of the black side, with the violence of the white side being efficient, fast death or incapacitation rather than torture. "We do not torture" and strict adherence to The Laws and Customs of War or the law will be invoked.