Apparently, Donald Trump isn't the only candidate putting his foot in his mouth on the campaign trail.

Libertarian presidential candidate Gary Johnson is in hot water with the Mormon population.

While discussing religious freedom in an interview with the Washington Examiner, Johnson said: "I mean under the guise of religious freedom, anybody can do anything. Back to Mormonism. Why shouldn't somebody be able to shoot somebody else because their freedom of religion says that God has spoken to them and that they can shoot somebody dead."

See images of Gary Johnson through the years:



3 PHOTOS Gary Johnson through the years See Gallery Gary Johnson through the years UNITED STATES - MARCH 3: Gov. Gary Johnson, former Governor of NM, speaks at the American Conservative Union's CPAC conference at National Harbor in Oxon Hill, Md., on Thursday, March 3, 2016. (Photo By Bill Clark/CQ Roll Call) UNITED STATES - FEBRUARY 26: Former New Mexico Gov. Gary Johnson pretends to have a heart attack on stage while arguing in favor of legalization of marijuana during CPAC in National Harbor, Md., on Feb. 26, 2015. Former Rep. Ann Marie Buerkle, R-N.Y., not pictured, had just argued during their debate that marijuana caused an increased risk of heart attacks. (Photo By Bill Clark/CQ Roll Call) ORLANDO, FL - SEPTEMBER 22: Former New Mexico Gov. Gary Johnson speaks in the Fox News/Google GOP Debate at the Orange County Convention Center on September 22, 2011 in Orlando, Florida. The debate featured the nine Republican candidates two days before the Florida straw poll. (Photo by Mark Wilson/Getty Images) Up Next See Gallery Discover More Like This HIDE CAPTION SHOW CAPTION of SEE ALL BACK TO SLIDE

Johnson said it's the government's job to prevent discrimination and allowing discrimination based on religion is going to "open up a can of worms."

New York Magazine reports that Johnson was likely referring to the Church of Jesus Christ of Latter-day Saints belief that church leaders can still experience divine revelation.

Both Hillary Clinton and Trump are widely unpopular in Utah, leaving the door open for Johnson to pick up some votes. But offending the Mormon population means offending as many as 60 percent of Utah voters.

RELATED: RCP poll average - Clinton vs. Trump vs. Johnson

Johnson later clarified his comments first through a campaign statement and then in an opinion article published on an LDS news website.

In the statement, Johnson said: "My reference to the LDS church, made during an impromptu conversation, was an admittedly very imprecise reference to the violence that accompanied the Mormon's early history in the 1800s. ... Absolutely no offense was intended, and I regret any that has resulted."

His opinion article goes on to say, "My point was that even a respected, peaceful people experienced tragic harm in the name of religion and was, in fact, persecuted by the government itself by politicians who opposed their beliefs and practices."