To the family next door, Armin Meiwes seemed the perfect neighbour. He mowed their lawn, repaired their car and even invited them round for dinner.

Other residents in the small German town of Rotenburg also believed there was nothing odd about the 42-year-old computer expert, whose light burned late into the night inside his creaking mansion. Yesterday, however, Meiwes appeared in court charged with killing - and then frying and eating - another man.

In one of the most extraordinary trials in German criminal history, the self-confessed cannibal admitted that he had met a 43-year-old Berlin engineer, Bernd Brandes, after advertising on the internet, and had chopped him up and eaten him.

It was, he said, something he had wanted to do for a long time. "I always had the fantasy and in the end I fulfilled it," Meiwes told the court on the first day of his trial for murder in the nearby city of Kassel.

Yesterday German prosecutors described how Meiwes had fantasised about killing and devouring someone, including his classmates, from the age of eight.

The desire grew stronger after the death of his mother in 1999, prosecutor Marcus Köhler said.

In March 2001 Meiwes advertised on the internet for a "young well-built man, who wanted to be eaten". Brandes replied.

On the evening of March 9, the two men went up to the bedroom in Meiwes' rambling timbered farmhouse. Mr Brandes swallowed 20 sleeping tablets and half a bottle of schnapps before Meiwes cut off Brandes' penis, with his agreement, and fried it for both of them to eat.

Brandes - by this stage bleeding heavily - then took a bath, while Meiwes read a Star Trek novel.

In the early hours of the morning, he finished off his victim by stabbing him in the neck with a large kitchen knife, kissing him first.

The cannibal then chopped Mr Brandes into pieces and put several bits of him in his freezer, next to a takeaway pizza, and buried the skull in his garden.

Over the next few weeks, he defrosted and cooked parts of Mr Brandes in olive oil and garlic, eventually consuming 20kg of human flesh before police finally turned up at his door.

"With every bite, my memory of him grew stronger," he said.

Behind bars, Meiwes told detectives that he had consumed his victim with a bottle of South African red wine, had got out his best cutlery and decorated his dinner table with candles. He tasted of pork, he added.

The unprecedented case has proved problematic for German lawyers who discovered that cannibalism is not illegal in Germany.

Instead, they have charged Meiwes with murder for the purposes of sexual pleasure and with "disturbing the peace of the dead".

The accused, however, has a unique defence: that his victim actually agreed to be killed and eaten.

Crucial to the case is a gruesome videotape made by Meiwes of the entire evening, during which Brandes apparently makes clear his consent.

Before setting off on his one-way journey to Rotenburg, Brandes was, outwardly at least, a successful, financially secure professional, with a live-in girlfriend.

The girlfriend, Bettina L, told German TV that she had enjoyed a healthy sex life with Brandes but they had split up after he revealed that he also liked men.

In fact, prosecutors said yesterday, Brandes was suffering from a severe psychiatric disorder and "a strong desire for self-destruction".

After killing Brandes, the German cannibal met five other men who responded to his internet advert, including one from London.

He did not, however, kill them. In July 2001 a student stumbled on Meiwes' chat-room and alerted the German authorities, who arrested him last December. Yesterday Meiwes told the court that he had felt lonely and neglected as a child after his father walked out on the family. He had fantasised about having a blond "younger brother", who he could keep forever by "consuming him".

If convicted, Meiwes faces life in prison. A verdict is due early next year. The cannibal's defence team, however, say that Meiwes is guilty at worst of 'killing on demand', which is punishable by five years in jail. In his pre-trial interview, the cannibal said that after eating Brandes he felt much better and more stable.

Brandes spoke good English, he said, and since eating him his English had improved. He also revealed that he is now writing his memoirs. The trial, which is due to last three weeks, continues.