A man accused of beheading and cannibalizing a passenger on a Greyhound bus apologized to police when he was arrested and begged officers to kill him. The details emerged Tuesday as Vince Li faced his murder trial by pleading not guilty.

The Chinese immigrant is accused of the second-degree murder last summer of Tim McLean, a 22-year-old carnival worker who was killed in what passengers described as a random, horrific attack.

Click here for photos.

"I'm sorry. I'm guilty. Please kill me," Li told police after his arrest, according to an agreed statement of facts between the prosecution and defense that was read in court.

Li pleaded "not guilty" himself in a clear, loud voice.

He appeared in court in a suit with an off-white collared shirt and running shoes without laces. He sat surrounded by security guards who separated him from dozens of McLean's friends and family sitting in the courtroom.

Li's lawyers are not disputing that he killed McLean, but they will argue Li was mentally ill and not criminally responsible. A psychiatrist told the court Li is schizophrenic and believed God told him to do it.

Three dozen passengers were aboard the bus as it traveled at night along a desolate stretch of the Trans-Canada Highway in western Canada. Witnesses said Li attacked McLean unprovoked, stabbing him dozens of times.

The statement of facts read in court said Li attacked Tim McLean "for no apparent reason" and McLean fought to escape before he died.

As horrified passengers fled the bus, Li severed McLean's head and displayed it to some of the passengers outside, witnesses said. A police report said an officer at the scene saw the attacker hacking off pieces of the body and eating them.

The statement said the attacker tried numerous times to leave the bus, but he was locked inside. Li eventually escaped through a window and was arrested. Police said some body parts were found in various areas of the bus and Li was carrying some.

McLean's family and friends, many wearing T-shirts with his picture, wept as the details were read.

Li did not understand his actions were wrong, psychiatrist Stanley Yaren told the court.

"A voice from God told him Mr. McLean was the force of evil and was about to execute him," he said. Li believed he had to act quickly to protect himself.

Yaren said Li was briefly hospitalized in 2003 or 2004 after he was picked up by police, who found him walking along a highway "following the sun" as he said he was ordered to by God.

The doctor said Li still has hallucinations and hears voices but is on strong anti-psychotic medication. Yaren described him as "a victim of this horrendous illness."

McLean's family found the suggestion that Li was a victim repugnant.

"At some point, my son's biggest mistake was going, 'How's it going?' And for that his head was cut off and his insides were splayed all over the inside of that bus," said Carol deDelley, McLean's mother.

"I'm having a very difficult time having any sort of sympathy. ... I don't think Mr. Li is a victim here."

Li, who came to Canada in 2001, pleaded at an earlier hearing in August for someone to "please kill me."

Canada does not have the death penalty.

His former wife said Li, who became a Canadian citizen in 2005, took unexplained bus trips and sometimes rambled. He was hospitalized briefly but never sought medical attention.

Before he left on the bus trip, he left his former wife a note: "I'm gone. Don't look for me. I wish you were happy."