Oleg Sokolov, a history professor at St. Petersburg State University is escorted to the courtroom in St. Petersburg, Russia, Monday, Nov. 11, 2019. The lawyer for a prominent Russian history professor suspected of murdering a female student, some of whose remains were found in his residence, is asking for him to be released under house arrest pending trial. The case of Oleg Sokolov has attracted wide attention in Russian media because of its grisly drama. (AP Photo/Dmitri Lovetsky)

ST. PETERSBURG, Russia (AP) — A St. Petersburg court on Monday ordered a prominent history professor suspected of murdering and dismembering a female student to be held in custody pending trial.

The case of 63-year-old Oleg Sokolov, who taught at the St. Petersburg State University who became famous for his books about the Napoleonic era, has dominated national newscasts in Russia.

Sokolov confessed to the murder, according to his lawyer, Alexander Pochuev.

Investigators alleged that Sokolov shot and killed 24-year-old Anastasia Eshchenko on Thursday at his apartment and then dismembered her body. He was detained Saturday after being pulled from St. Petersburg's Moika River with a backpack containing two severed arms.

The limbs were identified as those of the student; other body parts were found in the river and in Sokolov's riverside home in the historic part of St. Petersburg, less than one mile from the Hermitage Museum.

Sokolov broke into tears in the courtroom. He said he had a romantic relationship with Eshchenko and gave a rambling account of a quarrel they had, but didn't talk about his action in detail.

Russia's state television carried comments by Eshchenko's brother who said she had called him just before she was killed, crying and saying that she had quarreled with Sokolov who beat her. She told her brother that she had rushed out of his apartment but needed to come back to pick up her things.

The judge rejected Sokolov's appeal to be released under house arrest and ordered him to be held in jail for two months pending trial.

Sokolov has been awarded with France's highest award, the Legion of Honor, for his studies of Napoleonic France.

A fluent French speaker, he has been an enthusiastic member of military reenactment movements since the early 1990s and represented Napoleon in numerous representations of historic battles and other events.

Sokolov was popular among his students for his flamboyant style and fiery way of delivery.

In past interviews to Russian television, he spoke about his passion for the Napoleonic era. Napoleon was his idol and fellow history buffs would address him 'Sire,' the emperor's title.

Russian 47news online news site claimed that Sokolov had told investigators after confessing to murder that he was planning to don a costume of Napoleon and kill himself on the territory of St. Petersburg's iconic Peter and Paul Fortress.

The Russian Military-Historic Society that had listed Sokolov as a leading member quickly purged him from its ranks immediately after his detention was reported. The St. Petersburg university also dismissed him Monday.

Russian President Vladimir Putin, a graduate of the same university, was informed about the killing, his spokesman Dmitry Peskov said. Peskov called the case "a monstrous act of insanity."

Oleg Sokolov, a history professor at St. Petersburg State University sits in a cage waiting for a court session in St. Petersburg, Russia, Monday, Nov. 11, 2019. The lawyer for a prominent Russian history professor suspected of murdering a female student, some of whose remains were found in his residence, is asking for him to be released under house arrest pending trial. The case of Oleg Sokolov has attracted wide attention in Russian media because of its grisly drama. (AP Photo/Dmitri Lovetsky)
Oleg Sokolov, a history professor at St. Petersburg State University, left, listens to his lawyer sitting in a cage waiting for a court session in St. Petersburg, Russia, Monday, Nov. 11, 2019. The lawyer for a prominent Russian history professor suspected of murdering a female student, some of whose remains were found in his residence, is asking for him to be released under house arrest pending trial. The case of Oleg Sokolov has attracted wide attention in Russian media because of its grisly drama. (AP Photo/Dmitri Lovetsky)
Oleg Sokolov, a history professor at St. Petersburg State University reacts as he stands in a cage waiting for a court session in St. Petersburg, Russia, Monday, Nov. 11, 2019. The lawyer for a prominent Russian history professor suspected of murdering a female student, some of whose remains were found in his residence, is asking for him to be released under house arrest pending trial. The case of Oleg Sokolov has attracted wide attention in Russian media because of its grisly drama. (AP Photo/Dmitri Lovetsky)
FILE - In this Sunday, Sept. 16, 2012 file photo, Oleg Sokolov, a history professor at St. Petersburg State University, wears a 1812-era French army general's uniforms during a staged battle re-enactment to mark the 200th anniversary of the battle of Borodino which in 1812 was the largest and bloodiest single-day action of the French invasion of Russia, in St.Petersburg, Russia. Police in the Russian city of St. Petersburg are planning to interrogate a prominent professor who has been detained on suspicion of killing a female student after being pulled from a frigid river on Saturday, Nov, 9, 2019 with a backpack containing severed arms. (AP Photo/Dmitri Lovetsky, File) (AP Photo/Dmitri Lovetsky, File)
ARCHIVO - Esta foto de archivo del lunes 7 de enero del 2013 muestra a Oleg Sokolov, profesor de historia de la Universidad Estatal de San Petersburgo, con un uniforme de general del ejército francés de 1812 durante una recreación de la Invasión Francesa a Rusia en 1812, durante celebraciones para conmemorar la Navidad Ortodoxa Rusa en San Petersburgo, Rusia. (AP Foto/Dmitri Lovetsky, Archivo)