Former Gov. Mark Sanford on Sunday said he will mount a primary challenge to President Trump in 2020, jumping into the race after publicly toying with the idea for several months.

He said there needs to be a “conversation” on what it means to be a Republican.

“I think that as a Republican Party we have lost our way,” said the former South Carolina governor on “Fox News Sunday.”

Asked if he honestly thinks he has a shot at winning, Mr. Sanford said: “I’m saying, you never know.”

“The thing that has been lacking in this debate has been an earnest and real conversation on debt and deficits and government spending, and I find it astounding to watch the number of Democratic debates that I’ve seen and no mention, no conversation on where we’re going with regard to debt,” he said.

Mr. Sanford had previously instituted an informal deadline of Labor Day to decide whether to jump in, but postponed the decision as his state steeled for the arrival of Hurricane Dorian.

Mr. Sanford joins former Massachusetts Gov. Bill Weld and former Rep. Joe Walsh as the most prominent candidates mounting long-shot primary challenges to Mr. Trump, who continues to enjoy overwhelming support among GOP voters.

He said there should also be a serious conversation about the president’s tariff and trade policies, as well as on “humility” and a general approach to politics.

“We’re not going to solve some of the profound problems that we have as Americans by tweet,” Mr. Sanford said.

Mr. Sanford lost in a primary contest of his own last year after he had emerged as one of the few Republicans on Capitol Hill willing to publicly criticize the president.

In 2009, while serving as governor of South Carolina, he also admitted to a highly publicized extramarital affair. After an unexplained absence, his office said he had been hiking the Appalachian Trail when he had really been in Argentina with his then-girlfriend.

Mr. Sanford said Sunday that he went on an “apology tour” after his indiscretions came to light and that he learned another level of humility and empathy.

“And in contrast to the president, when he says there’s not a single thing that he sort of regrets or apologizes for, I profoundly apologize for that,” he said. “And I believe in the Christian model of repentance and renewal and a second chance.”

But Mr. Sanford and others face a steep uphill climb against Mr. Trump, who is extraordinarily popular among Republicans and has labeled Mr. Sanford, Mr. Weld, and Mr. Walsh the “Three Stooges.”

Rep. Doug Collins, the top Republican on the House Judiciary Committee, on Sunday said Mr. Sanford’s energy would probably be better spent elsewhere.

“Let’s all come together and put this president back and reelect him, and I think that’s what needs to happen in our party right now,” Mr. Collins, Georgia Republican, said on Fox News’ “Sunday Morning Futures.”

Mr. Sanford’s announcement also came as Republican parties in states like South Carolina, Nevada, and Kansas have moved to cancel or curtail their presidential nominating contests next year.

Mr. Weld and Mr. Walsh have cried foul, as the moves have invited criticism that the party is trying to shut down any opposition to Mr. Trump.

“They are literally denying their residents the right to vote to protect this incumbent president,” Mr. Walsh said in a recent appearance on CNN. “This president is like a mob boss and it’s beyond disappointing. The Republican National Committee, the Republican Party that pretty much controls a lot of these state parties, they’re doing all of Trump’s bidding. They worship him. They’re like a cult as well as so many of his voters.”

But the state parties have said the moves are cost-saving measures, and defenders have pointed to the past precedent of both parties moving to cancel or curtail their presidential nominating contests when they have an incumbent president running for reelection.

As a general rule, there’s “no rationale” to hold a primary when either party has an incumbent president in the White House, said Drew McKissick, chairman of the South Carolina Republican Party.

“With no legitimate primary challenger and President Trump’s record of results, the decision was made to save South Carolina taxpayers over $1.2 million and forgo an unnecessary primary,” Mr. McKissick said.