A high-profile federal LNP candidate has apologised for a tirade on social media threatening to harm Muslims.

Key points: Phillip Thompson apologised for the posts, saying they did not reflect who he was today

Phillip Thompson apologised for the posts, saying they did not reflect who he was today The LNP candidate said he was "self-medicating through" PTSD when he made the posts

The LNP candidate said he was "self-medicating through" PTSD when he made the posts Herbert is one of Labor's most marginal seats, having won it by just 37 votes in 2016

2018 Queensland Young Australian of the Year and former soldier Phillip Thompson posted on Facebook in 2012 after violent protests in Sydney in response to a film portraying the prophet Mohammed as a paedophile.

Mr Thompson blamed post-traumatic stress from his army service for the outburst.

The LNP is standing by its candidate for the Townsville seat of Herbert, which is Labor's most marginal seat in the country.

Mr Thompson posted comments on Facebook at the time, saying "I know what im (sic) doing this week getting my gun licence" and "give me a M4 and send to Sydney and I'll do the dishes (sic)".

He said on Saturday he had been in a "dark place" after being discharged from the military and was embarrassed by the comments.

"In 2009 I was wounded in Afghanistan and I went through a very dark time of self-medicating through my post-traumatic stress disorder," he said.

"I saw some extremists on TV protesting, calling for beheadings, and I made some comments that I'm ashamed of and something I'm extremely embarrassed about.

"I am very apologetic for any distress I may have caused with my comments."

Phillip Thompson (right) was Queensland's Young Australian of the Year in 2018. ( Supplied: Dimity Dornan )

Mr Thompson said he wanted a clean slate before the election.

"The people of Townsville deserve to know who they're voting for, they deserve to know the warts-and-all story," he said.

"Those comments don't reflect who I am today."

Herbert is currently held by Labor's Cathy O'Toole, who won the seat by 37 votes in 2016.

The LNP is putting in considerable resources to win it back and Prime Minister Scott Morrison visited the seat with Mr Thompson recently.

The ABC understands the Prime Minister's office was aware of the comments before the public apology.

David Hutchinson, acting president of the LNP, said Mr Thompson has made mistakes but would be "a great local member for Herbert".

"The LNP is aware of the struggles that Phillip Thompson faced while suffering from PTSD," he said.

"We know that he made mistakes that he regrets, but more importantly our members have recognised the man that he has become … and his determination to do everything he can for the people of Townsville."

The next federal election is due to be held in May and it is expected businessman Clive Palmer will also run for the seat.