MIAMI — A Florida man was arrested and charged with making death threats against a Republican state representative online, authorities said Tuesday.

Steve St. Felix, 34, was charged with threatening state Rep. Jose Felix Diaz after posting to Facebook that he would kill the Florida lawmaker, the Miami-Dade Police Department said in a statement on Tuesday.

St. Felix allegedly posted a message to the lawmaker’s Facebook on Sunday saying he would kill him if he showed up to a meeting, the statement said.

Steve St. Felix Miami-Dade Police Department

“Ill [sic] kill your ass and you better not show up to the next rec meeting,” the Facebook post read, according to a police report. The message was taken down shortly after it was posted, according to police.

Diaz said that because of recent attacks on government officials, he was “in fear for his life and the safety of his family,” according to the report.

Diaz told NBC News Tuesday afternoon that the post "quickly went from saying he was not supporting my campaign for the Senate to threatening to kill me — not only once, but twice."

He said that the suspect's threat referred to a Tuesday night dinner event for the Republican Party where local officials would be in attendance.

Diaz said it "gives me a lot of comfort" that authorities apprehended the suspect before the event.

"It would have been very easy to just see that and ignore it, but I think the next 48 hours would have been very tenuous and very scary," he said, adding, "I'm very proud of the efforts of our local police."

Rep. Jose Felix Diaz debates on the House floor on Feb. 24, 2016. Mark Foley / Rep. Jose Felix Diaz Office

The lawmaker said that based on social media posts he saw from the suspect, he believed the man may have been going through "some sort of psychotic break."

"It’s definitely a scenario with a positive result for not only my safety but also for his," he said.

St. Felix was arrested Monday at his home in Miami Gardens, Florida, and taken in for questioning, according to police.

The suspect allegedly said that he was “fed up with the Republican Party” and admitted to making the online threat against Diaz, according to the police report.

St. Felix said he was sorry for making the post and did not intend to harm the lawmaker, adding that he was not on his medication at the time he made the post, the report said. Police did not specify what medication St. Felix allegedly takes.

He was charged with written threats to kill or do bodily harm, according to Miami-Dade police.

The lawmaker announced last month that he would be running in a special election to fill a state Senate seat, after Frank Artiles resigned in April over using a racial slur and profanities in a conversation with two black colleagues, according to NBC Miami.

St. Felix's arrest comes nearly two weeks after a lone gunman opened fire on a Republican congressional baseball practice in Virginia on June 14, injuring five people, including House Majority Whip Steve Scalise.

Lauren Rigau reported from Miami and Daniella Silva from New York.