Judge Thokozile Masipa ruled that psychiatric evidence before the court could not replace “a proper inquiry” into his mental health.
Correspondents say the trial, which began in March, will almost certainly now face a lengthy delay.
The prosecution argued on Tuesday that psychiatric tests were essential and that he should be referred.
But the defense vigorously opposed the move.
Oscar Pistorius denies intentionally killing his girlfriend Reeva Steenkamp on Valentine’s Day last year.
He says he accidentally shot her through the toilet door in a state of panic, mistaking the 29-year-old model and law graduate for an intruder.
Oscar Pistorius could be evaluated for a minimum of 30 days at a psychiatric faculty as a result of the evaluation order.
In her ruling Judge Thokozile Masipa said that the South African criminal code stipulates that if an accused person is alleged not to be criminally responsible or is alleged to be mentally ill, he should be evaluated.
She said that such an evaluation would ensure that Oscar Pistorius would get a fair trial, adding it would be “preferable” for him to undergo the evaluation as an outpatient.
Prosecution lawyer Gerrie Nel made the referral application on Tuesday after forensic psychiatrist Merryll Vorster said earlier that the double amputee was suffering from generalized anxiety disorder (GAD).
Gerrie Nel said that the disorder diagnosis left him with no choice but to apply for an evaluation because the condition might have affected Oscar Pistorius’ behavior on the night he killed Reeva Steenkamp.
Legal experts say that the case may well hinge on the judge’s understanding of the athlete’s state of mind when he pulled the trigger.
They say the prosecution is keen to show that the defense keeps changing its reasons why Oscar Pistorius fired his gun – from putative self-defense, to accidental shooting, and now to something linked to his anxiety disorder.
WBnX2YDYRL4Image source: Wikimedia Commons President-elect Donald Trump celebrated his election victory at the Ultimate Fighting…
Millions of voters across the US chose to return Donald Trump to the White House…
Donald Trump declares victory in the US election as he addresses jubilant supporters in Florida.…
Stocks around the world are rising as Donald Trump appears to be on the cusp…
Donald Trump has won Pennsylvania, North Carolina and Georgia and taken a lead over Kamala…
Quincy Jones, the celebrated musician and producer who worked with Michael Jackson, Frank Sinatra, Ray…