The accused killer of an elderly Victorian man was serving a sentence in the psychiatric ward of a NSW prison when charged with the murder, a court has heard.
John Woodruff, 23, is charged with breaking into the Rye home of 72-year-old Barry Gray and stabbing him to death in May last year.
His lawyer Peter Ward told the Melbourne Magistrates Court Woodruff suffers from mental impairment and was being held in the psychiatric unit at Silverwater prison on unrelated offences when he was charged with murder on Thursday.
He said Woodruff will need to undergo psychiatric tests before he returns to court to face the charge.
"The issue of mental impairment is a live one," Mr Ward said.
Woodruff is also charged with trespassing, stealing Mr Gray's car, stealing another car in Blairgowrie, a town close to Rye, and stealing petrol.
Mr Gray lived alone and had been a long-time retired resident of the Victorian coastal town, south of Melbourne.
His family was in court for the brief hearing on Friday.
Woodruff will return to court on November 7 for a committal mention hearing.