DALLAS -- A 36-year-old Texas man has been sentenced to 18 months in federal prison for threatening to assassinate U.S. President Donald Trump, prosecutors said.

Mickael Gedlu was sentenced Friday, according to a statement from U.S. Attorney Erin Nealy Cox's office in Dallas. He pleaded guilty in December to making threats against Trump.

According to plea documents, Gedlu admitted he threatened Trump's life on social media, stating on YouTube: "I am waiting for Trump to visit Dallas before I attempt to assassinate him."

During court proceedings, prosecutors said that on May 31, 2018, Gedlu was observed across the street from Dallas' Adolphus Hotel just 30 minutes before Trump arrived there for a fundraiser. Dallas police officers noticed Gedlu holding a "Kill Trump" sign and detained him as he screamed "kill the president."

Prosecutors said the U.S. Secret Service conducted the investigation with the assistance of Dallas police.