BOSTON — Scott Lively isn't the type of candidate you typically find on a ballot in Massachusetts.

The staunchly pro-Donald Trump, Christian right firebrand with a long history of anti-LGBT writings and speeches has unexpectedly emerged as a Republican primary challenger to popular Gov. Charlie Baker. Lively did so by getting the votes of nearly 28 percent of delegates to the GOP state convention, surprising many in his party who doubted the founder of Abiding Truth Ministries could attain even the minimum 15 percent threshold needed to qualify for the Sept. 4 primary.

With little staff or money, Lively remains a considerable longshot to topple Baker, who had amassed nearly $8 million in his campaign coffers through mid-April. But the convention result suggests a blue state version of a larger Republican rift: conservative activists strongly behind Trump — who handily won the state's 2016 presidential primary — and resentful of moderates like Baker whom they accuse of drifting too far left to appeal to GOP voters in Massachusetts.

A closer look:

BAKER BACKLASH?

Opinion polls have consistently placed Baker among the nation's most popular governors, with approval ratings often exceeding 70 percent among likely voters in the Democratic-leaning state.

Yet slightly less than 70 percent of Republican delegates approved of Baker at the recent convention. What has apparently made Baker popular with most voters during his first term has made him unpopular with a faction within his own party.

Baker has distanced himself from the president after questioning in 2016 whether then-candidate Trump had the proper "temperament" for the White House. He's worked closely with and often has praise for Democratic legislative leaders. Baker is pro-abortion rights, pro-gay marriage and signed a law expanding anti-discrimination protections for transgender people.

A conservative group, the Massachusetts Republican Assembly, recently asked its followers to sign a "Declaration of Independence from Charlie Baker," claiming he was weakening the GOP, "while benefiting and enhancing the station of other political parties."

WHO IS SCOTT LIVELY?

According to his online autobiography, Lively spent a troubled childhood in the small western Massachusetts town of Shelburne Falls. His father, he wrote, suffered from mental illness and was arrested after an armed standoff with police at the family's home.

Lively, 60, said he turned to drugs and alcohol at an early age and spent 16 years drifting around the U.S. before fully embracing Jesus Christ in 1986 while at an alcohol treatment center in Portland, Oregon.

He became a spokesman for Oregon Citizens Alliance, a Christian political group that sponsored a failed 1992 ballot question that asked voters to declare homosexuality "abnormal, wrong, unnatural and perverse."

Lively later served as state director for the conservative American Family Association in California, where he also formed Abiding Truth Ministries. He returned to Massachusetts in 2008.

In 2014, Lively made his first run for governor as an independent. He received less than 1 percent of the vote.

HATE OR HYPERBOLE?

Lively's ministry, now based in Springfield, is included on the Southern Poverty Law Center's list of U.S.-based hate groups.

In 2012, an East African advocacy group sued Lively in U.S. District Court in Boston, claiming he helped coordinate efforts to persecute LGBT individuals in Uganda, including a proposed law to criminalize gay sex.

The suit was dismissed last year on technical grounds, but Judge Michael Ponsor made clear in his ruling that he believed Lively "aided and abetted a vicious and frightening campaign of repression" against the LGBT community.

In 1995, Lively co-authored "Pink Swastika," a book that espoused a theory that Germany's Nazi Party was heavily influenced by gay men.

Lively insists his opinions do not cross the line to hate speech and that he advocates therapy, not punishment, for gays.

"I'm guilty of some hyperbole," he said.