Haider Ali Motar was convicted of terrorism charges about a month ago for helping to carry out a string of Baghdad car bombings on behalf of the Islamic State extremist group. Now, the 21-year old is a reluctant cast member in a popular reality TV show.

"In the Grip of the Law" brings convicted terrorists face-to-face with victims in surreal encounters and celebrates the country's beleaguered security forces.

The show, produced by state-run Al Iraqiyya TV, is among dozens of programs, cartoons and musical public service announcements aimed at shoring up support for the troops after their humiliating defeat last summer at the hands of the Islamic State group, which now controls about a third of the country.

On a chilly, overcast day last week, the crew arrived at the scene of one of the attacks for which Motar was convicted, with a heavily armed escort in eight military pick-up trucks and Humvees. Passing cars clogged the road to watch the drama unfold, but were quickly shooed away by soldiers.

In this photo taken Tuesday, Dec. 16, 2014, a TV crew member attaches a lavalier microphone on Haider Ali Motar's yellow prison costume, as Motar performs a scene from "In the Grip of the Law," a reality show produced by Iraqi state TV, in Baghdad, Iraq. Image: Hadi Mizban/Associated Press

After being pulled from an armored vehicle, a shackled Motar found himself face-to-face with the seething relatives of the victims of the attack. "Give him to me — I'll tear him to pieces," one of the relatives roared from behind a barbed wire barrier.

A cameraman pinned a microphone on Motar's bright yellow prison jumpsuit as he stood alongside a busy Baghdad highway looking bewildered by his surroundings.

"Say something," the cameraman said to him.

"What am I supposed to say?" a visibly panicked Motar asked.

"It's a mic check! Just count: 1,2,3,4..."

In this Tuesday, Dec 16, 2014 photo, Ahmed Hassan, a reality show host, center right, stands next to Haider Ali Motar, as the TV crew films "In the Grip of the Law," a reality show produced by Iraqi state TV, in Baghdad, Iraq. Image: Hadi Mizban/Associated Press

Once the cameras were rolling, the show's host Ahmed Hassan quizzed the still-shackled prisoner. When Motar was confronted by one of the victims, a young man in a wheelchair who lost his father in one of the attacks, the convict began weeping, as the cameras rolled.

Iraq has seen near-daily car bombs and other attacks for more than a decade, both before and after the withdrawal of U.S.-led troops at the end of 2011. But the central message of the show, the filming of which began last year, is that the security forces will bring perpetrators to justice.

"We wanted to produce a program that offers clear and conclusive evidence, with the complete story, presented and shown to Iraqi audiences," Hassan told The Associated Press. "Through surveillance videos, we show how the accused parked the car, how he blew it up, how he carries out an assassination."

The episodes often detail the trail of evidence that led security forces to make the arrest. Police allow the camera crew to film the evidence — explosive belts, bomb-making equipment or fingerprints and other DNA samples.

"We show our audiences the pictures, along with hard evidence, to leave no doubts that this person is a criminal and paying for his crimes," Hassan said.

All of the alleged terrorists are shown confessing to their crimes in one-on-one interviews. Hassan said the episodes are only filmed after the men have confessed to a judge, insisting it is "impossible" that any of them are innocent.

"The court first takes a preliminary testimony and then they require a legal confession in front of a judge," Hassan explained. "After obtaining the security and legal permission, we are then allowed to film those terrorists."

Human rights groups have long expressed concern over the airing of confessions by prisoners, many of whom have been held incommunicado in secret facilities.

"The justice system is so flawed and the rights of detainees, especially those accused of terrorism, are so routinely violated that it is virtually impossible to be confident that they would be able to speak freely," Donatella Rovera, of Amnesty International, said in an email.

"In recent months, which I have spent in Iraq, virtually every family I have met who has a relative detained has complained that they do not have access to them, and the same is true for lawyers."

In a September statement, Amnesty cited longstanding concerns about the Iraqi justice system, "where many accused of terrorism have been convicted and sentenced to long prison terms and even to death on the basis of 'confessions" extracted under torture."

Such concerns are rarely if ever aired on Iraqi TV, where wall-to-wall programming exalts the security forces. Singers embedded with the troops sing nationalist songs during commercial breaks. In another popular program, called "The Quick Response," a traveling correspondent interviews soldiers, aiming to put a human face on the struggle against the extremists.

Iraqi forces backed by Shiite and Kurdish militias, as well as U.S.-led coalition airstrikes, have clawed back some territory following the army's route last summer, when commanders disappeared, calls for reinforcements went unanswered and many soldiers stripped off their uniforms and fled. But around a third of the country — including its second largest city, Mosul — remains under the firm control of militants, and nearly every day brings new bombings in and around the capital.

Back at the makeshift barricade set up for "In the Grip of the Law," security officials insist they are nevertheless sending a message of deterrence.

"Many of these terrorists feel a lot of remorse when they see the victims," said the senior intelligence officer overseeing the shoot, who declined to be named since he often works undercover. "When people see that, it makes them think twice about crossing the law."