One of Russia’s most notorious prisons, which over the years has housed inmates including Adolf Hitler’s nephew and the writer Alexander Solzhenitsyn, will soon be closed, according to a top prison official.

Butyrka, an imposing red-brick jail in central Moscow, now functions as a pre-trial detention centre that houses about 2,000 inmates. The whistleblowing lawyer Sergei Magnitsky spent almost a year in the prison before he died in 2009.

Staff monitor video screens at the main prison building. Photograph: Mikhail Svetlov/Getty Images

Valery Maksimenko, the deputy director of Russia’s prison service, told Moskovsky Komsomolets newspaper that Butyrka and another Moscow prison would be closed in the near future, and that the inmates would be moved to a new facility on the outskirts of city, on which construction is due to start in January. The buildings would be turned over the the municipal authorities, he said.

Some remain sceptical, given previous frequent rumours of closure that have come to nothing, but if Butyrka does close it will be the end of one of the most storied and feared prisons in the world.

A prison was first constructed on the site during the rule of Catherine the Great in the 18th century, and it briefly housed Emelyan Pugachev, the leader of a peasant revolt, before he was decapitated, drawn and quartered at a public execution in central Moscow.

Vladimir Mayakovsky; Alexander Solzhenitsyn Composite: getty / rex

Most of the existing structure dates from the 19th century, and during tsarist times housed some of the underground revolutionaries who would later go on to lead the Bolshevik revolution. In 1909, the young revolutionary Vladimir Mayakovsky was incarcerated there and began writing verse for the first time. He would later become one of Russia’s best-known poets.

After 1917, the new communist regime turned Butyrka to their own use and it filled with prisoners during Stalin’s purges in the 1930s.

“A multitude of screams and groans from tortured human beings burst simultaneously through the open windows of our cell,” recalled the writer Evgenia Ginzburg, who was incarcerated at Butyrka in 1937, at the height of the purges. “Over and through the screams of the tortured, we could hear the shouts and curses of the torturers. Added to the cacophony was the noise of chairs being hurled about, fists banging on tables, and some other unidentifiable sound which froze one’s blood.”

Other notable writers incarcerated at Butyrka in the 1930s and 1940s include Solzhenitsyn, Varlam Shalamov and Osip Mandelshtam. Hitler’s nephew Heinrich was captured by Soviet forces in 1942 during the Nazi attack on the Soviet Union, and died at Butyrka.

Soldiers guard the Butyrka prison in 1917. Photograph: Alamy

After the collapse of the Soviet Union, the prison continued functioning as a pre-trial detention centre. When the media tycoon Vladimir Gusinsky was arrested and briefly held there in 2000, he was so shocked by the conditions he paid from his own money to fix the roof and provide new bedding for inmates. They have frequently complained of poor conditions, lack of light and exercise and low-quality or non-existent medical care.

Magnitsky, the lawyer who uncovered a major tax fraud perpetrated by Russian officials, developed pancreatitis and gall stones while at Butyrka, and was repeatedly denied medical treatment. He was reportedly moved to a series of cells, each one’s conditions worse than the last, as he refused to change his testimony under pressure. He eventually died of his illnesses.

Butyrka has become a byword for the grim conditions of the Russian prison system, but has also provided musical inspiration, giving its name to a popular Russian band who sang ballads about prison life. Their song titles include “I’ll do time for others’ sins” and “It’s a wonderful autumn in the prison camps”.