There have been so many times Josh Allen could have hung up his cleats.

The gritty St. Paul Saints second baseman could have done it when he wasn’t drafted after college. Or after his first injury, which required Tommy John surgery.

The native of central Florida could have called it quits after being sideswiped by a stray bullet at police academy training. Or after lighting up the independent Frontier League for four years but getting nary a nibble from major league organizations.

Or after tearing the meniscus in his left knee while shagging fly balls barely two months after joining the Binghamton Rumble Ponies, the New York Mets’ Class AA affiliate, last summer. Or when he was released by the Mets — his only experience with MLB-affiliated baseball — after his knee healed.

He could have quit. If it had ever crossed his mind, that is.

Allen, 28, will be at second base for the St. Paul Saints on Thursday when they host the Milwaukee Milkmen in their 2019 opener at CHS Field. It’s his second go-round with the team; he had a productive month with the Saints last year before the Mets came calling.

When the Mets released him after last season, Allen had two thoughts: Quitting is not an option. And he wanted to go back to St. Paul.

“My dad ingrained in my head that if you want something, go after it and don’t let anything get in your way,” Allen said. “To go out on an injury was not how I wanted my career to end.”

A winding career path is perfectly suited for the independent American Association.

Comeback trail

After college, Allen was out of baseball for nearly a year before the itch to play again became too strong to resist. Unsure about how to get back into the game, he and his father searched for opportunities.

“We sat down one night and Googled ‘pro baseball tryouts,’ ” Allen said with a laugh. “The nearest one was in Nashville. I went up there, and even though I hadn’t played baseball in about 11 months, I had a pretty good showing.”

It led to a contract with Evansville of the Frontier League, an independent league considered a notch below the American Association.

At the same time, he was attending the police academy at South Florida State University, thinking of post-baseball options. During a firearms proficiency test, another trainee had her gun pointed the wrong way while changing her magazine and inadvertently pulled the trigger. The bullet skimmed across Allen’s chest.

“If it had hit me dead on, I wouldn’t be here,” he said. “Kind of a lucky/unlucky situation.”

Playing through the discomfort of a gunshot wound, Allen’s hard-nosed play earned him Frontier League All-Star honors in his first season. He made two more All-Star teams, winning league MVP honors in 2016, before leaving after 2017.

Despite hearing nothing from major league organizations, he realized he wasn’t ready to return home where, among other things, he hunts alligators.

“They’re everywhere in Florida, like dogs here,” Allen said.

His Evansville manager, Andy McCauley, recommended him to Saints manager George Tsamis, an old friend. He won a spot with the Saints last season and, after barely a month, stood out enough to catch the eye of a Mets scout.

“We had a lot of Double-A, Triple-A type players, but it was Josh that got signed,” Tsamis said. “That says a lot about his work ethic and what kind of player he is.”

“My dad used to say ‘It’s all about the dirt,’ ” Allen said. “My goal, after every game, is to be the dirtiest guy on the team. Nothing’s going to stop me from doing what I love.”

When Tsamis heard that Allen had become available again, Tsamis called him immediately, hoping to coax him back to the Midwest.

“He’s what you want in a player. He plays the game the right way,” Tsamis said. “He keeps his mouth shut, he plays hard and he does his job. The day I saw [that he was released], I reached out to him.”

It was an easy sell. Going back to St. Paul was Allen’s first choice. In fact, it was his only choice.

“As soon as I got cut from the Mets, I knew I wanted to come back here,” Allen said. “Here, it’s such a special place,” Allen said.

“With the stadium and the fans and the coaching staff, it’s an environment unlike any other that I’ve experienced in my career.”