The man accused of the Seattle university shooting has revealed to police that he intended to kill many more people before turning the gun on himself.

Aaron Ybarra, 26, told detectives, just hours after his arrest, that he had aimed to kill as many people as possible and then take his own life.

The revelation came out after a judge at Seattle’s King County Jail courtroom decided to hold Ybarra, without bail, on suspicion of shooting four students at the campus of Seattle Pacific University.

Download the new Independent Premium app Sharing the full story, not just the headlines

The spree which happened late on Thursday saw the gunman enter the campus and open fire on students in one of the university’s buildings.

In total, four students were hit.

Paul Lee, 19, died of the injuries sustained during the attack, while the other three were treated in the nearby Harborview Medical Center, with one still in a critical condition.

The gunman was stopped when student building monitor John Meis, 22, used pepper spray to subdue the shooter before several other students jumped on the gunman.

According to police, the gunman had 50 additional shotgun shells when he was apprehended and it is believed that these were intended to be used against more students.

Despite Ybarra telling Police of his desire to kill more, Ybarra’s lawyer, public defender Ramona Brandes, said that Ybarra was very sorry for his actions and "cognisant of the suffering of the victims and their families.”

Ybarra’s lawyer said that he had a long history of mental health issues for which he was taking medication for at the time of the shooting.

This was confirmed by police who said that Ybarra had been admitted to hospital twice in recent years to have his mental state assessed.

Daily coronavirus briefing No hype, just the advice and analysis you need Enter your email address Continue Continue Please enter an email address Email address is invalid Fill out this field Email address is invalid Email already exists. Log in to update your newsletter preferences Register with your social account or click here to log in I would like to receive morning headlines Monday - Friday plus breaking news alerts by email Update newsletter preferences

He also had had run-ins with the law prior to the shooting.

In 2012, police found Ybarra lying by the side of the road and told officers that he wanted a SWAT team “to make him famous.”

In 2010, Ybarra phoned 911 to tell them that he “had a rage inside.”

Those close to Ybarra say that the attack was puzzling because it came at a time when Ybarra seemed to be overcoming some of his previous issues.

Ybarra’s friend, Zack McKinley, said that he had just started a new job bagging groceries at the local shop and was very happy to be employed.

McKinley said that Ybarra could get “emotionally low” at times but had a lot of friends around that would support him through these episodes.

The family of Ybarra released a statement that said they were “shocked” and “saddened” by the shootings at SPU and were “crushed at the amount of pain caused to so many people."