Justice Peter Churchman today said the pair were living together in an employer-owned property.
Gilchrist "had formed the view that Mr Collins had some form of power over him and that he was the cause of his problems".
Collins was unaware of Gilchrist's thoughts and was friendly and helpful toward him, even teaching him to drive his employer's trucks.
On September 20 after work, Gilchrist took a stainless steel knife from the kitchen and drove to a house where he knew Collins was, approaching him and stabbing him in the back without warning.
Part of the knife broke off, and Gilchrist continued to stab Collins with the broken knife in the neck and upper body.
A neighbour heard Collins' screams and called the police, after which Gilchrist fled the scene. Collins died of his injuries.
As he entered the court today, Collins' family members and loved ones slammed the glass barrier between the public gallery and the dock which the defendant was entering.
They yelled at Gilchrist, calling him a "f***ing freak" and a "bastard".
The family members had to be warned they would be removed from the court if they did not stop.
Court security guards stood in front of the doors leading to the main section of the courtroom, blocking any potential entry by members of the public.
Dr Barry-Walsh was called in court to give evidence before Justice Peter Churchman about Gilchrist.
He said he had prepared two reports on the state of Gilchrist's sanity for the court.
Reading from one of his reports, Barry-Walsh said Gilchrist displayed "psychotic ambivalence" over the killing, and said it was evident he had suffered from a serious and treatment-resistant mental illness for many years.
Reading from the report of another doctor, Barry-Walsh said Gilchrist was a risk to himself and other people when he was unmedicated, and had at one point in the past hit a roommate on the head with a brick.
Gilchrist had left Whangārei earlier in the year, overdue on his medication. When he was located and apprehended, he was not psychiatrically assessed.
After the killing, he made little effort to dispose of the evidence and tried to assure a witness he was not stabbing Collins, but the witness noted he was "bizarrely calm and untroubled" by her presence.
Gilchrist's illness, which has been exacerbated over the years by substance abuse, caused him to be admitted to hospital multiple times in the past.
Barry-Walsh said Gilchrist was clearly mentally unwell at the time of the killing, and his actions appeared to driven entirely by psychotic illness.
He recommended Gilchrist be held in hospital as a special patient.
Collins' mother read an informal victim impact statement in court, saying Collins had taken Gilchrist in after discovering he was homeless and sleeping in a car.
She said her life had been "a living hell" since the murder.
"My life has been shattered," she said, explaining how she had trouble sleeping and getting out of bed, and generally functioning each day.
"I also dream of you coming after me," she said to Gilchrist.
She said Collins was a "beautiful, caring person".
On the evidence given today, Justice Churchman found Gilchrist not guilty on the grounds of insanity. He ordered Gilchrist be detained as a special patient.
"Essentially Mr Gilchrist's detention will continue indefinitely until a direction is given by the Minister of Health that he be reclassified or discharged," he said.
He told the gathered family that anything he said or did could not lessen their loss.
A name-suppression order for Gilchrist lapsed today, to applause from the family.
Violence erupted in the public gallery as Gilchrist was led out of the courtroom, with Collins' family again hammering on the glass and shouting at him. A brief scuffle broke up between some family members and court security.
Outside court, Collins' partner's stepmother Kelly Hickling said Gilchrist had been stopped by police the night before the killing, but was let off without his medication.
She said police contacted mental health services, who informed them that they could not give Gilchrist his medication without his consent.
Hickling said the tragedy "could have happened to anyone at any time".
"If someone's that mentally ill, why do they have the right to say that [they don't] need the medication?"