UPPER MARLBORO — Former University of Maryland student Sean Urbanski will face hate crime charges in the 2017 killing of 2nd Lt. Richard Collins, and racist images from his cellphone will be included in the trial, despite motions filed by his lawyers to drop those charges and omit that evidence from proceedings.

Urbanski, who is white, is also charged with murder in the death of Collins, a black Bowie State University student who was days away from graduating when he was fatally stabbed at a campus bus stop in May 2017. The trial is set to begin July 22.

At a motions hearing at the Prince George’s County Circuit Courthouse on Wednesday, Judge Lawrence Hill upheld the state’s argument that Urbanski should be charged with a hate crime, and that certain evidence from his phone — including racist cartoons and images that advocated violence — should be considered at trial.

“The stabbing of Lt. Collins was based on the defendant’s racial bias toward black people,” said Jason Abbott, one of two prosecutors for the state. “[The images] show why the only black person at the bus stop that day was stabbed.”

[Read more: UMD campus climate survey finds detachment, safety concerns are higher among minorities

Urbanski’s trial has been delayed three times. It was originally scheduled to start in January 2018.

Hill’s ruling struck down three separate motions the defense had filed — one to bar the digital evidence, one to split the murder and hate crime charges into two separate trials, and one to drop the hate crime charge completely.

Urbanski’s lawyers argued before Hill and a packed courtroom that the images from his cell phone — which they called “stupid jokes” — had no connection to the murder and would unfairly prejudice the jury against their client.

“As offensive and insensitive as they are, they are not evidence of hate-based motive,” said John McKenna, one of Urbanski’s attorneys. “There is simply no connection, your honor, between these memes and the homicide.”

[Read more: UMD students criticize Loh’s speech on the two-year anniversary of Richard Collins’ death]

Allowing the jury to see the images, McKenna argued, would have “clear free-speech implications” and “impinge on [Urbanski’s] right to a fair trial.”

Though an investigation by the FBI failed to find sufficient evidence to charge Urbanski with a federal hate crime, the state will be able to move forward with both charges in one trial.

“Severing the two counts would be like trying to remove water from ice,” said prosecutor Jonathon Church. “You just can’t do it.”

The prosecution showed Hill seven images that were at issue, all of which were saved to Urbanski’s phone. The first was dated Dec. 25, 2016, and new ones were added almost monthly in the period leading up to the killing. The last photo was dated April 18, 2017 — about a month before the murder.

Most of the photos were racist, and a few seemed to advocate violence, Hill said.

The images were not shown to the courtroom, but Hill described several of them aloud. One of the photos depicted a noose, a handgun and poison, he said, while another alluded to differences in the DNA of black people and white people.

Hill said Urbanski’s steady accumulation of the photos could establish a “chain of events” before the killing that could help the state prove Urbanksi’s motive.

“Their relevance is not outweighed by any prejudicial value,” he said.

Collins’ parents were in the front row, his mother crying softly throughout the proceedings. They looked on as the prosecution played video of their son’s killing to the judge — though the screen was turned away from the crowd and the sound was off — and listened as the lawyers analyzed each frame.

The defense said Urbanski was “out-of-his-mind drunk” and “screaming incomprehensibly” at the time of the murder, and argued that Collins’ race was not a factor in the killing.

But the prosecution maintained that Urbanski “stood in the shadows” watching Collins and his friends — a white male and an Asian female — before choosing to stab Collins, the only black person there.

“The defendant selected Mr. Collins,” Abbott said. “He has a bias. He’s showing a hatred toward black people.”