Pretoria, South Africa (CNN)-- Oscar Pistorius, the onetime Olympic athlete turned murder suspect, must undergo a month of psychiatric testing before his trial continue, the judge in the case ruled Wednesday.
The move puts his trial on ice indefinitely.
It was triggered by the testimony of a psychiatrist who testified that the sprinter has suffered from generalized anxiety disorder since he was an infant, stemming partly from the amputation of both of his lower legs because of a genetic defect.
Pistorius is accused of murdering his girlfriend, the model Reeva Steenkamp, in his home last year.
Pistorius, 27, does not claim he was insane or mentally incapacitated when he shot her, but when the defense put the psychiatrist on the stand, it raised the question of the athlete's mental health, the judge said Wednesday.
"A doubt has been created" that Pistorius may have a psychiatric issue that would affect the court's verdict, so she must order the testing, Judge Thokozile Masipa said Wednesday.
"The accused may not have raised the issue that he was not criminally responsible at the time of the incident in so many words, but evidence raised on his behalf cannot be ignored," she said of testimony by Dr. Merryll Vorster.
She acknowledged that her order would mean a long delay in the trial, but said that was not the most important consideration.
"This is not about anyone's convenience, but about whether justice has been served," she said.
"The aim of the referral is not to punish the accused twice," Masipa said, saying that Pistorius should be examined as an outpatient rather than committed to an institution if possible.
Court will reconvene on Tuesday for her to issue her order formally, she said.
At that point, Pistorius will learn when and where he will be tested.
The prosecutor had argued in favor of psychological evaluation, while the defense argued against it.
The testing will be done by a panel of experts who will then submit a mental health report to the court, CNN legal analyst Kelly Phelps said.
At one extreme, they could find that Pistorius was mentally incapacitated at the time he killed Steenkamp, which would end the trial immediately in a verdict of not guilty by reason of mental illness, she said.
But it would also mean Pistorius needs to be committed to a mental health institution against his will until he is found not to be a danger, she said.
Another option is that they could find he had "diminished responsibility" at the time he killed Steenkamp. In that case, the trial would continue and his mental health would be taken into consideration during sentencing if he is found guilty, said Phelps, a criminologist and law lecturer at the University of Cape Town.
The third possibility is that the experts could disagree with the defense psychiatrist and say that Pistorius' mental health is not an issue at all. If that happens, Vorster's testimony will be disregarded, Phelps said.
The experts might not all agree with each other, and lawyers on either side could disagree with the experts' report, leading to any number of possible outcomes.
If there is any dispute, the final decision about what to do with the experts' report lies with Judge Masipa.
Pistorius admits shooting Steenkamp but says he thought there was an intruder in his house. He has pleaded not guilty.
The athlete's defense team is trying to show that Pistorius made a genuine mistake and responded reasonably on the night he shot Steenkamp, 29, a model and law school graduate.
If the trial continues after the psychiatric evaluation, Judge Masipa must decide whether Pistorius genuinely made a mistake or whether he murdered Steenkamp intentionally.
If she does not believe the athlete thought there was an intruder, she will find him guilty of murder and sentence him to at least 15 years in prison, and possibly life.
South Africa does not have the death penalty.
If Masipa accepts that Pistorius did not know Steenkamp was the person he was shooting at, she could find him guilty of culpable homicide, a lesser charge than murder, or acquit him, according to CNN legal analyst Kelly Phelps.
A verdict of culpable homicide would leave the sentence at Masipa's discretion.
The prosecution rejects the sprinter's defense that he mistakenly thought he was defending himself and his girlfriend from an intruder.
The state contends that Pistorius argued with Steenkamp before killing her.
The defense team is seeking to cast doubt on the state's case and needs to show only that there is a reasonable doubt that Pistorius meant to kill Steenkamp.
There is no dispute that Pistorius fired four bullets through a door at Steenkamp in his home early on the morning of Valentine's Day 2013. Three hit her, causing devastating wounds. The final shot struck her head and probably killed her almost instantly, a pathologist testified in March.
The trial has seen Pistorius break down repeatedly, crying, wailing and sometimes throwing up as the court sees and hears evidence about Steenkamp's death.
Vorster said the athlete's physical distress was real.