In the Heart of the Machine is a prison drama with plenty of violence. It takes place in 1978, when Bulgaria was controlled by a repressive and brutal Communist regime. The protagonist, Boris Radulov, known as Bohemy (Alexander Sano) seems a bit different from the other murderers and rapists who surround him. Indeed, he has apparently been framed for murder because of his political beliefs. The warden (Hristo Shopov) calls him in and offers him early parole if Bohemy can put together a team that can double production at the local Kremikovtsy Steel Plant. Bohemy agrees, but only on the condition that he can add to his team a much-feared murderer who is on death row for having, in a drunken rage, hacked to death his father and his brother during the brother’s wedding. Bohemy  explains that this man, known as The Hatchet (Igor Angelov), understands lathes and is unusually strong.

The other members of the team are The Needle (Hristo Petkov), who stabbed to death a grandmother and her granddaughter; The Gypsy (Stoyan Doychev), also known by his real name, Krasni, who raped a 14-year-old girl; and The Teacher (Ivaylo Hristov), who serves as a sort of spiritual guide for the others.

At the steel plant, they are overseen by two guards, the sadistic Captain Vekilsky and a rookie guard whom the prisoners call “Junior.” Work begins, but an unexpected obstacle develops. A dove is trapped inside the heavy lathe, and The Hatchett refuses to work until the dove is freed. When Vekilsky orders the team to turn on the lathe anyway, The Hatchett seizes Junior and threatens to kill him, a threat that certainly must be taken seriously considering The Hatchett’s history.

The prisoners lock themselves inside the factory. Vekilsky warns the guards on the outside of the door that he and Junior are being held hostage. When The Teacher opens the door in an attempt to explain the situation and negotiate, a nervous guard shoots him to death.

Bohemy pleads with the warden to give them time to somehow open the lathe and free the dove, while a special forces captain, the same person who had framed Bohemy, tries to overrule the warden and kill all the inmates, even if it endangers the lives of the two guards inside.

As the prisoners, with the help of Junior, try to open the lathe and free the dove, the prisoners speak about their regrets and their dreams of what they would do if they were free.

At the end of In the Heart of the Machine, a credit comes on dedicating the film to the late Boris Radulov because, as it turns out, the film is inspired by a true story.

According to producer Alexander Penev, the real Boris Radulov was a friend of the father of the film’s director, Martin Makariev. Makariev, Penev and screenwriter Boby Zahariev enjoyed listening to Radulov’s tales of the Communist period. Then, one day, he told them The Story, which the filmmakers made into In the Heart of the Machine.

The Hatchet was a real person from the village of Prekolnitsa, near the borders with North Macedonia and Serbia. He did kill his brother and his father and then, when he realized what he had done, turned himself in to the police.

The Needle really did murder an elderly woman and her granddaughter in an apartment in Sofia. Originally given the death penalty, his sentence was changed to life imprisonment.

Krasni the Gypsy really did have sex with a 14-year-old, who later married him while he was still in prison.

Not surprisingly, the filmmakers made some changes for dramatic effect. Nobody died in the real incident. And, most important of all, there was no dove inside the lathe. It was a sparrow.