She's seeking to run in the spring provincial election.

TORONTO — Former Ontario Tory leadership hopeful Tanya Granic Allen, who is now seeking a party nomination ahead of a spring provincial election, is defending herself after coming under fire for comments made online years ago about Muslims and gay marriage.

Granic Allen, a parental rights and anti-abortion advocate, denied Tuesday that posts and tweets in which she suggests gay marriage shouldn't be legalized in the United Kingdom and says women should not wear burkas in public reflect Islamophobic or homophobic views.

"My concern...has always been about the freedom of religion, the freedom of conscience and freedom of expression and protecting those very important rights, which is why I opposed the banning of the niqab even though I personally take issue with it," she told The Canadian Press.

Earlier:

Her online comments, which date back to 2013 and 2014, were condemned by the Liberals and New Democrats, who said it would be up to Tory Leader Doug Ford to decide whether he wants someone with those beliefs as a candidate.

Ford, meanwhile, said only that the sentiments expressed by Granic Allen, who is seeking to run in the Toronto-area riding of Mississauga Centre, do not reflect his views or those of the party.

"Our base is growing, and we want all Ontarians to feel like they have a place in our party," he said in a statement.

Ford and Granic Allen were considered the more socially conservative candidates in the Tory leadership race, and Granic Allen was the only one to appear by Ford's side as he was declared the winner in March.

'I don't believe people should dress like ninjas'

In a 2013 post discussing Quebec's controversial and ultimately unsuccessful proposal for a charter of values, Granic Allen described niqabs and burkas as "masks" that cover the face.

"I don't believe people should dress like ninjas when going for an afternoon stroll. I don't believe that people should dress like bank robbers when going to vote," she said. "My daughter loves wearing a spider-man mask, but I forbid her from wearing it out in public."

In another case, she linked to a news story about an attack on two teenage girls in Zanzibar, calling it "yet another reason not to vacation in a Muslim country."

Granic Allen said Tuesday that she was voicing concerns about travelling to countries in which there have been terrorist attacks but not advocating against visiting Muslim countries specifically.

More from HuffPost Canada:

"I didn't say people shouldn't (go), I just said it's perhaps a reason not to," she said, adding that she wants to visit Egypt and see the pyramids.

She also denied that a tweet in which she wished the Queen would not allow gay marriage meant she opposed the practice. "Somebody wrote that gay marriage would force the Queen to break her oath and I simply said, 'Well the Queen should keep her oath,' because we should not lie," she said.

Another tweet where Granic Allen expressed shock that Malta had passed a law allowing gay marriage and adoption "wasn't anything pro or con," she said, simply an observation on how quickly the country had acted on the issue.

Granic Allen would not, however, clarify whether she supports gay marriage, saying it is a federal issue. "It has nothing to do with this election and I don't need to comment on that," she said.

"The Conservatives will have to decide...how they will go forward, but that kind of behaviour, that kind of language, that kind of attitude I believe has no place in our society," Wynne said.

Horwath said it was disappointing to see someone with views "that can be described as racist and homophobic" seeking public office.

"It's certainly not something that I would be condoning as leader of my party," she said.

Helen Kennedy, executive director of the LGBT rights advocacy group Egale, said Granic Allen's statements were "very alarming" but not surprising given some of the opinions Granic Allen voiced during the leadership campaign.

This kind of speech "does a huge amount of harm, not only to the LGBT community, obviously, but she's targeting other communities as well," she said.

Kennedy said that kind of "ignorant rhetoric" is exactly why children should be taught about inclusion and acceptance — topics included in the sex-ed curriculum that Granic Allen vehemently opposes and has lobbied to repeal.