A judge decided Wednesday that a New Jersey man whose racist rant against his neighbor went viral will remain in jail until his trial, saying he poses a "high risk of danger to the community."

Superior Court Judge Terrence Cook issued his ruling against Edward C. Mathews, 45, during a remote detention hearing, according to a local ABC News affiliate station.

Mathews started an altercation with his Black neighbor earlier this month, approaching him while yelling racial slurs and eventually ramming his chest into the other man. Videos of the incident made their way around social media and resulted in more than 100 protesters arriving at Mathews's home.

ADVERTISEMENT

He was later taken into custody by local police.

Burlington County Assistant Prosecutor Jamie Hutchinson said during the Wednesday hearing that the encounter was not the first time Mathews had harassed his neighbors. He was allegedly involved in several incidents dating back to April of last year, WPVI reported.

"He was shooting up cars this entire time, he was throwing rocks at cars and he was smearing feces on cars. The ammunition confirms this and it's not a leap to assume that it would escalate his behavior if he was in fact released and that ammunition could be aimed at a person next time," Hutchinson reportedly said.

Mathews has been charged with 14 counts, including harassment, biased intimidation and assault.

Anthony Rizzo, his attorney, reportedly argued on Wednesday that the evidence the prosecution obtained under an extreme risk protective order was faulty due to Mathews being detained at the time. 

Cook said that while his ruling to keep Mathews in jail took into account the evidence, it was based on the man having 20 prior convictions and his use of "racially derogatory language" during the altercation, the ABC News station reported.

Mathews will have seven days to appeal his case. He is set to return to court on Aug. 25.