Former South Carolina Gov. Mark Sanford ended his presidential primary challenge to President Donald Trump on Tuesday, blaming the impeachment drama in Washington for crowding out a discussion of policy issues.

Sanford, who formally launched his protest campaign a month ago with a sparsely attended event in Philadelphia, announced his decision during a news conference in New Hampshire. He had been planning to file in the early primary state on Friday.

“You’ve got to be a realist, and what I did not anticipate is an impeachment,” Sanford said. “All of the oxygen is leaving the room, in terms of meaningful debate, on what comes next in our country on a whole host of issues.”

Sanford, 59, who was a rare Trump critic among Republicans in Congress, lost his congressional seat last year after a pro-Trump challenger accused him of being disloyal to the president.

He kicked off his long-shot bid Sept. 8, becoming one of three Republicans with elected experience who sought to compete with Trump for the GOP nomination. A little more than a month later, Sanford announced his campaign at an Independence Mall news conference attended by two aides, three journalists, a registered Democrat whose daughter studied under Sanford at the University of Chicago, and a group of curious students visiting from Paris. (A family with a selfie stick was 30 yards away.)

Sanford participated in forums with the other two GOP candidates, former Illinois Rep. Joe Walsh and former Massachusetts Gov. Bill Weld, but to his frustration, there was little interest in his campaign platform to shrink federal spending.

With the Republican Party unified around Trump, he was unable to gain any real traction or attention. As he exited the race, Sanford lambasted the “atrocious” way Republicans in South Carolina and some other states had restricted or canceled their Republican primaries to pave the way for Trump.

“I don’t think we want to get our cues on electoral participation from North Korea,” he said.

He also bemoaned how, with Republicans largely silent on the president’s deficit-spending behavior, Democrats running for the office had proposed larger and more expansive government programs.

“The fact that Elizabeth Warren is offering $50-plus trillion in additional spending is, to me, fiscal malpractice,” Sanford said.

In his Oct. 16 appearance in Philadelphia, Sanford speculated about his prospects. If there was a genuine concern among voters about “the financial realities of our country,” he said, his campaign would see “some level of measure and movement.”

“And if there’s not,” he added, “there won’t be. And it will be short-lived.”

Staff writer Anna Orso contributed to this article.