A Massachusetts man was arrested in New York on Thursday after trying to hire a hit man on Twitter to kill ICE agents for $500 and sharing his desire to slit the throat of Sen. John McCain, federal officials said.

The U.S. Attorney's Office for the District of Massachusetts said that Brandon Ziobrowski, 33, from Cambridge, Mass. was charged with one count of use of interstate and foreign commerce to transmit a threat and injure another person for the alleged Twitter posts this year.

Federal officials said Ziobrowski tweeted a murder for hire solicitation to kill Immigration and Customs Enforcement agents for $500, and repeatedly tweeted his desire to slit the throat of McCain, R-Ariz.

"The agents and officers out there enforcing federal laws are doing their job, plain and simple," U.S. Attorney Andrew Lelling said at a news conference. "There is a difference between public debate and putting others in fear of their lives."

Federal officials said Ziobrowski in March started tweeting threatening messages against federal agents that work for ICE.

On July 2, the 33-year-old allegedly tweeted: “I am broke but will scrounge and literally give $500 to anyone who kills ICE agent. @me seriously who else can pledge get in on this lets make this work.”

Ziobrowski's Twitter handle, @Vine_II, had 448 followers at the time of the tweet.

FBI Special Agent in Charge Harold Shaw said that Ziobrowski had expressed "extreme anti-U.S." rhetoric on his account, and professed support for "socialist" and "communist" ideology. Four law enforcement officers have been killed across the region in the past year, to which Shaw said “enough is enough.”

MIDWEST ICE RAIDS TARGETED BUSINESSES THAT HIRED, MISTREATED ILLEGAL IMMIGRANTS, OFFICIALS SAY

Lelling said the July 2 tweet received two likes, but officials are looking into if anyone reached out to the 33-year-old about the threat.

"He appears to be very much against ICE and its mission. He appears to have a violent dislike for at least one Republican senator and law enforcement," he told reporters.

There is a trend "upward" in threats against the lives of law enforcement offices, especially those in charge of enforcing federal immigration laws, according to Lelling, who added there is no indication the 33-year-old was part of any organized group.

"Feeling strong on this subject is fine. Putting people's lives in danger, not fine," he told reporters.

PREVIOUSLY DEPORTED ILLEGAL IMMIGRANT WHO RAPED CHILD AFTER PHILADELPHIA RELEASE, PLEADS GUILTY TO REENTRY

Lelling added while we may live in a time of heated political rhetoric, "each of us" are responsible for setting limits on political speech to not put people's lives at risk.

"People who try to politicize our mission are within the legal right to freedom of speech," Peter Fitzhugh, special agent in charge of Homeland Security Investigations in Boston, said at Thursday’s press conference. “But when freedom of speech crosses a line into threats or offers to have federal law enforcement officers killed, we will never tolerate that.”

Ziobrowski faces up to five years in prison if convicted, in addition to three years supervised release and a $250,000 fine.

He briefly appeared in federal court in Brooklyn, N.Y., Thursday afternoon and was ordered released on $50,000 bond. As part of his bail, Ziobrowski was ordered to surrender his passport and refrain from making threats via any medium.

Ziobrowski's next court appearance is scheduled for Aug. 15 in Massachusetts.

Fox News' Samuel Chamberlain, Andrew Fone and Tamara Gitt contributed to this report.