The chief executive of a California cybersecurity startup has resigned from his position after threatening on social media to kill President-elect Donald Trump.

>> Read more trending stories

Matt Harrigan, who founded cybersecurity company PacketSled Inc. in 2011, made the threats on Facebook as election night unfolded, The San Diego Union-Tribune reported. Harrigan has since deleted his account on the social media site, but a person on Sunday posted screenshots of the comments on Reddit.

"I'm going to kill the president elect," Harrigan wrote. "Bring it, Secret Service."

In another comment, he said that he was, "Getting a sniper rifle and perching myself where it counts. Find a bedroom in the (White House) that suits you (expletive). I'll find you."

Harrigan took to Twitter on Monday to apologize for the comments, which he called "a flawed joke."

"My humble apologies that a flawed joke has become public/out of context," he wrote. "My poor judgement does not represent the views of (PacketSled) customers, investors or the officers of (PacketSled). I have no malicious intention toward the (president of the United States) and apologize for my lack of judgement and offensive commentary. I wish you all well."

The company's board of directors on Tuesday accepted Harrigan's resignation. Chief technology officer Fred Wilmont will fill Harrigan's role as the board searches for his replacement.

In a statement released a day earlier, PacketSled said it reported Harrigan's comments to the Secret Service after learning of them. The company promised to cooperate with authorities and said Harrigan had been placed on administrative leave.

"We want to be very clear, PacketSled does not condone the comments made by Mr. Harrigan, which do not reflect the views or opinions of the company, its employees, investors or partners," the company said in a statement.

PacketSled creates "forensics software that detects where a cyberattack is coming from, what files are being targeted and which devices are being affected, among other things," The Los Angeles Times reported.