One of the two brothers who beat a Mexican homeless man in Boston said he was inspired by Presidential Candidate Donald Trump’s views on illegal immigration, according to police records.

The two brothers on Wednesday urinated on a 58-year-old man sleeping near a train station before punching him and beating him with a metal pole, according to police.

The man was treated for various injuries including a broken nose and several bruises.

The two brothers, Scott and Steve Leader, are facing charges including assault and indecent exposure. Both have pleaded not guilty and are being held without bail.

Witness’s say they flagged down a state trooper at about 12:30 a.m. after seeing the attack and watching the brothers walk away laughing, prosecutors said.

Following Scott’s arrest, he told troopers "Donald Trump was right, all these illegal’s need to be deported."

The presidential candidate has been facing controversy since he called some illegal Mexican immigrants “criminals” and “rapists.”

He recently said that if elected, he would deport millions of illegal immigrants and then sort “good ones” from “bad ones,” before letting the “good ones” back into the country.

When Trump was asked about the beating during a New Hampshire town hall meeting on Wednesday night, he said he hadn’t heard about it but called it “a shame.”

The Mexican government has confirmed the victim of the beating as one of its citizens.

Daniel Hernandez Joseph, the consul general of Mexico in Boston, announced that his government would "take the necessary measures to defend the rights and interests of Mexicans."

Mexican officials said they would follow the investigation “very closely” to ensure perpetrators of the crime are held accountable.

According to court records, Scott had served a year in jail for assaulting a Moroccan coffee shop worker.