By Alex Eliseev and Kanina Foss

Morne Harmse, 18, accused of slashing a fellow pupil to death with a samurai sword, told a doctor a ghost had ordered him to become a Satanist, a court heard on Wednesday.

The revelation came in a report by the doctor who first examined him in prison after the fatal attack on fellow pupil Jacques Pretorius at the Nic Diederichs Technical High School in Krugersdorp.

The doctor's report to the Krugersdorp magistrate's Court says: "Patient (Harmse) alleges that he had seen a ghost in a field in a farm that he and his parents rented.

"He alleges that the ghost instructed him to be a Satanist."

Harmse, who was making his his second appearance in court, is charged with the murder of Pretorius and the attempted murder of three other people in the attack.

Dr M M Mlefi-Litheko, who conducted the medical examination on Monday, a week after the killing, says in the report: "He (Harmse) looked depressed. His affect (mood) was flat. He had a good insight into the incident."

After Wednesday's appearance, Harmse was sent for a month-long mental observation at Sterkfontein hospital.

He is due back in court on September 26.

It should then be clear whether he is fit to stand trial and answer to the charges.

Harmse, represented by Dolph Jonker, stepped into the dock this morning dressed in a bright blue sweatshirt and cargo pants.

His parents, Machiel and Liza Harmse, were seated a metre or two away in the front row.

For 13 minutes, while the doctor's report was read into the record and the formalities were completed, Harmse did not look back at his family once.

Liza Harmse cried softly as she saw her son enter the dock.

When the proceedings ended, her husband could no longer contain the tears and the parents wept together.

Harmse stood slouched in the dock and spoke only twice, each time to answer magistrate Erina Breedt with a soft "Ja".

Afterwards, the parents declined to speak to the media, saying they were not ready to do so. They did not attend their son's first court appearance last week.

Trauma counsellor Natisha Hoffman, who was in court to support the parents, said on Wednesday: "They are very emotional, but they're stable and reaching out for help."

Liza Harmse had told her that "only God can help (the family)".

During his 30-day stay at Sterkfontein he will be observed by at least three psychiatrists - one from the hospital and two representing both his defence and the State.

Police detectives have pieced together most of the details of the attack and are lining up witnesses to help convict Harmse for what they believe was a premeditated act.

It is alleged that seven pupils met three days before the August 18 attack and discussed various ways of committing a school massacre.

Harmse, according to police, was the only one to take the discussion seriously.

Last Monday he allegedly arrived at school with three samurai swords and a small knife in his red school bag. He had also packed three homemade masks that resembled those worn by death metal band Slipknot, according to statements.

Before the first school bell rang, Harmse - with black paint smeared on his skin - allegedly slashed the throat of 16-year-old Pretorius, and wounded another pupil and two of the school's groundsmen.

Police say he then stuck the sword in the ground and casually sat down on a low brick wall.

Police say they discovered several items in Harmse's room that suggested he had been experimenting with Satanism.

His parents confirmed this in an open letter three days later.

But detectives are not focusing on Satanic influences and believe Harmse spent the weekend ahead of the attack preparing.

They say he asked another boy to build a "bomb" - which proved to be a dummy that did not contain explosives.

In his first court appearance, last week, Harmse appeared alongside fellow pupil Max Brechlin, 18, who was arrested because he had allegedly been seen wearing one of the Slipknot masks and holding a sword.

The charges against Brechlin have been withdrawn and he now looks likely to be called as a state witness.