If John Persinger wins the mayoral race in Erie, Pa., next month, it just might be the greatest local political upset in America this century. A Republican candidate has not been elected mayor here since 1961, when JFK was president.

Tall, witty, energetic and razor-sharp, Persinger is not the guy you’d expect to settle in a town like Erie. He is the kind of person who leaves, moves on to blazing success elsewhere and never returns.

Persinger’s grandfather, John DeMarco, was the son of Italian immigrants who was supposed to take over the family grocery store but instead went to medical school and ended up delivering more than 12,000 Erie babies.

Before he was born, Persinger’s parents moved to the suburbs outside New York City, but young John spent his summers with his grandparents in this port city in northwestern Pennsylvania. He got his undergrad degree at Harvard, where he was captain of the swim team; he also competed in the 2000 US Olympic team trials.

From there he served as an aide in the George W. Bush White House and then chief of staff at the US Embassy in Australia, where he met his wife, a journalist fluent in Arabic. He left government for Notre Dame Law School, but when the couple started to have children, they decided Erie held the most promise for their young family.

In many ways, they are correct. The city is affordable, the housing is charming. It is both a college town (there are three: Mercyhurst, Gannon and Penn State Behrend) and a tourist town (miles and miles of beaches along the lake). It boasts some of the top medical facilities in the country, and it is also a company town (Erie Insurance is one of the top employers).

But it is also a struggling city, where schools are hurting financially, the opioid epidemic is rampant and the manufacturing base is collapsing — all factors that led Erie County residents to vote for a Republican president in 2016, the first since Ronald Reagan.

The city of Erie, however, is a different story — Hillary Clinton won all 69 of its voting districts over Donald Trump.

So can 35-year-old Persinger convince his townspeople to turn red? It’s not impossible. And while he is nothing like the president in terms of temperament and style, the two politicians do share a key quality — tapping into voters’ willingness for change. The fourth-largest city in the state, Erie has a population just under 100,000 and a 5.6 percent unemployment rate.

“One of Erie’s biggest challenges in City Hall is a lack of guidance and stewardship,” Persinger told The Post.

“There are great institutions and individuals in the private sector, but there’s never really been a leader to bring them all together . . . to leverage that for greater outside investment and more opportunities outside the region.”

As Persinger walked the shop floor of Fralo Industries, a sheet-metal fabricating plant, he talked to each worker, asking what they were making. One young man said he was building a new invention for college dorms that puts laundry in a shoot and allows students to track its progress until it’s ready for pickup in a pod. Another worker was steering a high-tech laser.

Persinger gives each worker his full attention, nodding and taking notes. He seems unbothered by the fact he’s a Republican in a city with a nearly 3-1 Democratic registration advantage. Here, people are born blue.

It doesn’t seem to ruffle him that his rival, Democrat Joe Schember, is one of the nicest guys in the world and has been active in the community for over 40 years. Plus, they’re neighbors (they even live on the same street).

‘Everyone asks me about my odds. I am confident if I run a good, honest campaign, I can win.’ - John Persinger

“Everyone asks me about my odds. I am confident if I run a good, honest campaign, I can win,” Persinger said. “I didn’t take time away from my family and waste the time of voters . . . not to win.”

Persinger is forward-thinking and energetic; he drives around in a mobile campaign office (a 22-year-old converted RV) with his name and photo shrink-wrapped around the entire vehicle. He visits neighborhoods, churches, community centers, mosques, synagogues and knocks on doors where no Democratic or Republican mayoral candidate has been for decades, especially in the African-American and Hispanic communities.

And he listens. It is a trait that has not gone unnoticed in the black communities who for years have had their votes taken for granted by the Democrats and ignored by the Republicans.

Just ask Steve McLallen, who got a visit from Persinger earlier this year. “Hey, I just want to let you know I appreciate your willingness to come and listen to our concerns,” McLallen told Persinger as he shook hands with the GOP candidate. “You have made an impression and impact on me, not just by traveling to our neighborhoods or where we work, but actually asking us what we need.”

A longtime Democrat, McLallen said he is voting for Persinger.

Jim Baer, meanwhile, is looking for new blood in the mayor’s office. A welder at Fralo, he’s a Democrat who did not vote for Clinton or Trump but is tired of the same old politics. “Look, we tried the old ways; we have had nothing but Democrats running this city and managing the decline. It is time to place someone young with different ideas and the willingness to listen in charge,” he said.

Schember, meanwhile, is sitting in his campaign headquarters on State Street in downtown Erie. He is tall, soft-spoken, and it is clear he has spent his career solving problems — every sentence is gentle and detailed with broad explanations.

“I grew up in Erie, the kids called me ‘Father Joe’ because at 13 I went away to seminary school. I knew I wanted to be a Catholic priest,” he said. That vocation did not change until he was a sophomore in college. Now 66, he is focusing his efforts on winning the traditional way. He has a list of “super voters,” who, he explains, “have shown up reliably for the past two general election cycles.” He is also contacting them with door knocks and phone calls.

While neither candidate has invested in polling, both keep detailed data on their campaigns’ voter outreach and they know this race is close.

On Nov. 7, it will be clear whether machine politics has prevailed or if Persinger’s message has struck a chord — and caused a seismic shift — among the populace. So far, no one has paid much attention to this race outside the city limits. But if Persinger wins, a flood of national media will descend, trying to figure out what is wrong with Erie.