MADRID, Spain (AP) _ A man who hacked to death a janitor as part of a fantasy game was convicted Tuesday of murder and sentenced to 42 years in prison.

Javier Rosado, 23, stabbed Carlos Moreno because the 52-year-old man fit a physical description of a victim that Rosado had thought up for a role-playing game, according to court testimony.

The five-day trial last month centered on testimony from Rosado's friend and co-defendant, Felix Martinez. Rosado refused to testify.

Martinez, 19, said Rosado had created a fantasy game in which the goal was to commit ``the perfect murder.'' He and Rosado chose Moreno after spotting him at a Madrid bus stop late one night in April 1994, he said.

Martinez admitted witnessing the slaying but claimed not to have taken part. The court convicted him of being an accessory to murder and sentenced him to 12 years in prison.

A prosecution report said Rosado inserted both hands into a wound in Moreno's throat to rip out tissue and cartilage while Martinez tried to disembowel him.

Lawyers for the defendants argued that the two men had become so involved in their fantasy game that they no longer understood or were fully responsible for their actions.

Two other men were cleared of charges of covering up the murder by not informing police.