DOYLESTOWN, Pa. (AP) — The man accused of beheading his father in their suburban Philadelphia home early this year and posting a video of the severed head online is competent to stand trial, a judge ruled Thursday.

The decision by Judge Stephen Corr came after a five-hour hearing in which prosecutors and defense lawyers each presented expert witnesses.

The defense expert, Dr. John Markey, said he had met with Justin Mohn, the man charged in the late January slaying, four times for nearly five hours and determined he had a delusional disorder. Markey reviewed letters Mohn had written in which he claimed he was a messiah and a King David-like figure whom the federal government was persecuting.

Mohn came to believe his own public defender was an agent of the federal government and working against him as well, and he wrote a letter to Russia’s ambassador to the United States, seeking to strike a deal to give Mohn refuge and apologizing to President Vladimir Putin for claiming to be the czar of Russia, Markey said.

“It’s all delusional,” Markey said.

A forensic psychologist who testified for the prosecution, though, said Mohn was competent.

Mohn, wearing a yellow prison jumpsuit with his hands cuffed in front of him, sat in the courtroom throughout the testimony, his chin titled up slightly. He reacted, at times animatedly, throughout the hearing.

080124-Father-Beheaded-Social-Media
A vehicle is parked in the driveway of a home that was a scene of a murder in Levittown, Pa., on Wednesday, Jan. 31, 2024. A graphic video from a man accused of beheading his father that circulated for hours on YouTube has put a spotlight yet again on gaps in social media companies? ability to prevent horrific postings from spreading across the web. Police said Wednesday that they charged 32-year-old Justin Mohn with first-degree murder and abusing a corpse after he beheaded his father in their Bucks County home.Photo by Jessica Griffin /THE ASSOCIATED PRESS

According to prosecutors, Mohn fatally shot his father with a pistol and then used a kitchen knife and machete to decapitate Michael Mohn at the Levittown house where they both lived.

Justin Mohn then recorded a video in which he held up his father’s head and identified him as a 20-year federal employee, while calling for violence against the government. Prosecutors have said they found blood stains on the desk in the room where the video was recorded along with a computer that had several tabs open, including one for YouTube.

In the video, Justin Mohn also espouses a variety of conspiracy theories and rants about the Biden administration, immigration and the border, fiscal policy, urban crime and the war in Ukraine.

The video was posted on YouTube for several hours before it was taken down.