Jim Shalleck, center, campaigns with Christine Thron, left, as they speak with Becky Byrd of Germantown, who describes herself as a staunch Republican. (Andre Chung/For The Washington Post)

James Shalleck, the Republican candidate for Montgomery county executive, was recently approached by a woman at a campaign stop who felt compelled to explain why she would never support him.

“She said she wouldn’t vote for me because of Ted Cruz’s position on immigration,” he said, referring to the Republican senator from Texas who opposes amnesty for undocumented immigrants.

“I said, ‘What do you want from me?’ ” Shalleck recalled, his exasperated tone still rich with the intonations of his native New York.

Shalleck, who will face two-term incumbent Isiah Leggett (D) on Nov. 4, has been at the bottom of this mountain before. Since 1994, he’s run three times for state’s attorney and once for judge in a county where registered Democrats have a 3-to-1 advantage over Republicans. The last time a GOP county executive held office was 1978.

Montgomery’s more moderate Republicans also suffer from the county’s location in Washington’s back yard, where they must contend with what Shalleck calls “the echo” of positions taken by national party figures such as Cruz.

Jim Shalleck, the Republican candidate for Montgomery County executive, is seen while campaigning on Oct. 5. (Andre Chung/For The Washington Post)

But Shalleck, 68, relishes his seemingly perennial candidacy. The long odds include Leggett’s fundraising edge. Shalleck has $2,400 cash on hand, compared with Leggett’s $425,000, according to the most recent state filings.

At times, Shalleck, who spent 12 years as a prosecutor in the Bronx, can sound more like a Democrat than the real ones he debated during the primary season (he ran unopposed in his party).

He talks about spending on “the big-vision stuff” to give the county a stronger identity: a four-year university, a minor league baseball team, Arena football and maybe a venue that would save families a trip to the District to watch their children graduate from high school.

“I had to schlep to the DAR Hall to see my kids graduate,” Shalleck told an audience this year. “It takes two hours, and you get a $60 parking ticket because you’re running late.”

The son of a Democratic lawyer, he was a member of that party until 1989, when he moved to Washington to join the Justice Department’s antitrust division at the beginning of George H.W. Bush’s presidency.

At the same time, Shalleck said he grew dismayed with the Democratic Party, especially its approach to taxation and other economic policies.

“I was just more comfortable with the Republican philosophy,” he said. In 2008, he was Maryland vice chairman for the presidential campaign of Sen. John McCain (R-Ariz.).

At his core, the diminutive criminal defense lawyer from Montgomery Village is a law-and-order hard-liner who has made public safety his overriding issue. Shalleck wants to place police in cars at each of the county’s more than 200 public schools, a move he says would deter the kind of mass shootings that have devastated other communities.

“I never want to see a CNN helicopter over one of our schools,” he says as part of his stump speech.

More broadly, Shalleck contends that Leggett “doesn’t make public safety a priority” — a criticism that Leggett sarcastically dismissed.

“I’m not sure he’s looking very carefully at what’s out there,” Leggett said, citing a 9 percent drop in crime since 2012. Serious offenses (murder, rape, robbery) are down by a third since 2007 — a decline that exceeds the downward national trend. Leggett’s budgets over the past four years have added more than 120 officers to the county police force.

Some schools do a have a regular police presence, Leggett said, but deploying officers and patrol cars to every building would be prohibitively — and unnecessarily — expensive. Turning schools into “fortresses” would not automatically make them safer, Leggett said.

While Shalleck has some costly ideas, profligate spending is one of his criticisms of Leggett. He wants to repeal the nickel tax on plastic shopping bags and trim 3 percent from the county’s administrative costs.

Like most candidates who promise to eliminate waste, fraud and abuse, Shalleck is squishy on the details, saying only that he will “start at the fringes.” He also says Leggett has fostered an anti-business culture in county government, with onerous regulations and bureaucracy that keep big employers away.

Leggett recounted the cuts he made in programs and personnel during the recession and pointed to the county’s AAA bond rating from Wall Street as proof that “the rest of the world sees Montgomery as being a very sound county in terms of expenditures.”

As an assistant Bronx district attorney in the 1970s, Shalleck helped interrogate David Berkowitz, the “Son of Sam” serial killer, who said he was forced to take orders from a neighbor’s demonically possessed dog.

Shalleck recalled Berkowitz as a chubby, soft-spoken young man whose eyes were “terrifying.” Berkowitz confessed to the killings, and the case never went to trial. But Shalleck treats the experience of dealing with Berkowitz as his political signature, using the killer’s creepy mug shot in one of his television ads.

His experience with Berkowitz is one of the reasons he tells Montgomery audiences that there are “evil monsters among us.”

Shalleck, who went on to serve as assistant New York state attorney general before joining the Justice Department, said he has no illusions about the likely outcome of next month’s vote. But he remains the classic happy warrior, loving the hurly-burly of politics.

Asked if he’ll run again, he said, “I’d like to run for reelection.”

For a May 27 profile of County Executive Isiah Leggett, Shalleck’s Democratic opponent, go to http://wapo.st/1nXxPkO.