BILLINGS, Mont. — A retired Park Service ranger says U.S. Senate hopeful Tim Sheehy of Montana has been lying about a bullet wound that the candidate said came from fighting in Afghanistan — going public with an accusation that has nagged the Republican’s campaign for months.

The claim from former ranger Kim Peach on Friday that Sheehy in fact shot himself on a family trip in Montana was immediately dismissed by Sheehy and his allies as a smear campaign engineered by Democrats in a race that’s expected to help decide control of the Senate. But with the election less than three weeks away, it adds pressure to the political newcomer as he challenges three-term Democratic incumbent Sen. Jon Tester.

Sheehy was a Navy SEAL, and his military record is a centerpiece of his bid for office. During stump speeches and in a book published by Sheehy last year, he recounts being wounded on multiple occasions during combat, including in the arm in 2012.

Sheehy was awarded a Purple Heart for wounds suffered in a separate combat incident; he also received a Bronze Star.

A Sheehy campaign spokesperson said Peach was a partisan Democrat pushing a “defamatory story.”

“Anyone trying to take away from the fact that Tim Sheehy signed up for war as a young man and spent most of his 20s in some of the most dangerous places in the world is either a partisan hack, a journalist with an agenda, or outright a disgusting person,” spokesperson Katie Martin said.

He’s faced scrutiny over the arm wound since April, when The Washington Post quoted a Glacier National Park ranger anonymously saying Sheehy accidentally shot himself in 2015, when he was traveling with his family and his gun fell out of a vehicle and fired when it hit the ground in a parking lot on Logan Pass. Peach is the ranger who was quoted in the story.

Sheehy was ticketed and paid a $525 fine for illegally discharging a firearm in Glacier, government records show.

The Republican candidate said in response to the April story that he lied to the park ranger — not about being wounded in Afghanistan.

Sheehy said he fell while hiking at Glacier and injured his arm, then concocted the story about the bullet wound to cover up the fact that the 2012 incident may have been friendly fire. He said he didn’t want members of his SEAL unit in Afghanistan to suffer any consequences.

With absentee voting in Montana underway and Sheehy poised for potential victory, Peach, a Democrat, said Friday that he “couldn’t let him get way with something like that without the truth being told.”

Peach said he interviewed Sheehy at the hospital where he was treated for the bullet wound and briefly confiscated the gun. Before returning it, Peach said he unloaded the weapon and found five live rounds and one that had been fired.

“At the time, he was obviously embarrassed about it. And you know, he admitted to what I was there for — the gun going off in the park,” Peach told The Associated Press. “He knows the truth and the truth isn’t complicated. It’s when you start lying things get complicated.”

Attorneys for Sheehy’s campaign said Peach’s recent statements differ from the facts in a declaration submitted by the ranger after interviewing Sheehy in 2015.

The declaration made no mention of Peach examining the gun and finding only five live rounds, the attorneys wrote in a letter provided by the campaign. There was no gunshot residue on Sheehy when he went to the hospital nor any gunshots reported in Glacier that day, attorneys Daniel Watkins and Dustin Pusch wrote.

Peach, who was a park ranger for more than three decades, denied any connection with the Tester campaign or other Democratic organizations.