Jasper Spires, top left, is accused of fatally stabbing Kevin Sutherland aboard a Metro train on July 4. ((CLOCKWISE FROM TOP LEFT) Reuters, Evy Mages/For The Washington Post, Photo courtesy of Matt Grossman)

The District man accused in the July 4 fatal stabbing of a stranger aboard a Metro train had been admitted to psychiatric facilities in the area at least two times in the three months before the attack, according to court and medical records.

The details were revealed Friday as a D.C. Superior Court judge ordered a full mental competency screening for Jasper Spires, 18, who is charged with first-degree murder in the slaying of American University alumnus Kevin Sutherland.

Sutherland, 24, was headed to join friends for Independence Day festivities when he was stabbed about 30 times as other frightened Red Line passengers looked on. Authorities said the attacker had tried to steal Sutherland’s cellphone.

Judge Robert E. Morin ordered the full evaluation after considering the findings of a psychologist who had conducted an initial assessment of Spires.

In a report filed with the court, the psychologist wrote that on April 22, Spires was admitted to the Howard University psychiatric unit but, against medical advice, left. On June 3, Spires was referred to the Psychiatric Institute of Washington for admission. The report did not make clear whether he was admitted.

In at least one of the episodes, Spires had displayed “bizarre and combative behavior,” was assaultive and had to be restrained, according to the report. One of the incidents included “possible intoxication with a history of recent psychotic” behavior. No additional details of the prior incidents, including any diagnoses, were outlined.

After a 45-minute meeting with Spires at the jail, the court-appointed psychologist wrote that because Spires was uncooperative, she was unable to determine whether he was competent to stand trial. She recommended that Spires undergo a complete assessment.

In addition to Spires’s interactions with the two District psychological facilities, Spires was civilly committed at Inova Fairfax Hospital in Virginia in May for a week-long mental health observation, according to medical records viewed by The Washington Post.

At Friday’s brief hearing, Spires’s attorney, Antoini Jones, asked that his client be released to have the mental evaluation done.

Sitting in the back of the courtroom were Sutherland’s parents, who came from Connecticut to attend one of the hearings for the first time. Sutherland’s father shook his head at the release request.

Morin denied Jones’s request, ordered Spires to remain in jail and set another hearing for Oct. 9. Unlike at previous hearings, where Spires laughed, smiled and even interrupted a judge, Spires remained silent and displayed no emotion.

After the hearing, Spires’s attorney said his client had a recent history of mental illness prior to his arrest and that his client was not involved in Sutherland’s death.

“Yes, my client has mental problems, but he is innocent of these charges. D.C. police need to catch the real killer. No one identified my client as the killer,” Jones said.

According to charging documents, of the nearly one dozen passengers who were on the train at the time of the attack, one witness who was asked to view a photo array of nine people picked out two individuals other than Spires. Two other passengers gave only descriptions of the attacker, including the clothes and a red bandanna that police say matched Spires’s attire when he was arrested two days later.

Although the court psychologist was unable to conduct a full assessment of Spires, she provided new information about his behavior in jail, including possible suicide attempts.

The psychologist revealed that shortly after Spires was arrested, he was placed on suicide watch in the D.C. jail after he made knots with his jumpsuit and bedsheet and put his mattress against his cell door. Jail officials transferred him to the mental health unit temporarily.

In his meeting with the psychologist, Spires denied wanting to harm himself and said he tied the knots as a way of “doing his art,” the psychologist wrote in her report.

Spires told jail officials he had smoked marijuana before June 30 and had never been treated for mental health issues, according to the report. He told the psychologist that he never used illicit drugs or alcoholic beverages.

After Spires’s arrest, authorities said they believed that Spires may have been high on synthetic drugs at the time of the July 4 attack.

Many details of Spires’s mental health issues remain unclear, Jones said after the hearing. Spires graduated from Woodrow Wilson High School in 2014 and attended Louisburg College in Louisburg, N.C., for a semester and a half before returning to Washington.

Leaving the courthouse, Sutherland’s parents declined to comment, but they provided a written statement in which they thanked “everyone for their outpouring of love and support.”

“We have confronted the person accused of causing so much pain and grief for Kevin’s family and friends, but we are determined to be here to honor and represent our son, an innocent victim of a senseless and brutal murder,” Sutherland’s parents wrote. “Kevin thrived in and loved his adopted city of Washington and he had a bright promising future ahead of him. Kevin was our hero and he was the center of our life. Now we are determined to see justice done for Kevin.”