Days after killing himself, a vocal advocate for gun rights and Republican presidential candidate Donald Trump has won a New York primary election.

Assemblyman Bill Nojay was facing a fraud trial in Cambodia and reportedly under FBI scrutiny when he went to his family's cemetery plot in Rochester and shot himself in front of an arriving police officer on Friday.

Now the defeat Tuesday of challenger Richard Milne coupled with a quirk in state election law means that local GOP leaders, who encouraged voters to choose Nojay despite his death, get to pick someone to take on Democrat Barbara Baer in November. Nojay's Republican-leaning district in the Legislature's lower chamber covers parts of suburban Rochester and the Finger Lakes region.

"I really don't know what to say. It's such an unusual situation," Milne told The Associated Press as unofficial results showed him trailing by nearly 1,000 of the 4,500 votes cast.

Though he hopes the three county leaders put him on the ballot, Milne was critical of "robocalls" and other efforts by the "powers that be" to boost Nojay after his death.

"They really did some things in the past few days that were in poor taste in my opinion to sway the vote," he said.

While rare, posthumous elections happen, notably when Missouri Democratic Gov. Mel Carnahan died in a plane crash but defeated the Republican incumbent and future U.S. Attorney General John Ashcroft in a 2000 Senate race. That victory led to the appointment of Carnahan's widow, Jean Carnahan, to the Senate. Since 1962, four people who died close to Election Day have been elected to the House of Representatives.

Nojay, a 59-year-old Rochester native and father of three, was elected to the Assembly in 2012 and quickly emerged as a leading critic of stricter gun control laws that Democratic Gov. Andrew Cuomo pushed through the Legislature after the Sandy Hook Elementary School massacre. He had graduate degrees in law and business from Columbia University and was a research fellow at Tribhuvan University in Kathmandu, Nepal, according to his official biography.

In addition to his work as a lawyer and lawmaker, Nojay hosted a regional conservative talk radio show and encouraged Trump when he previously flirted with running for governor of New York.

Authorities haven't said what might have been behind Nojay's suicide, but multiple Rochester media outlets have reported he was due to surrender to the FBI to face federal fraud charges on the afternoon he killed himself near his brother's grave. Federal prosecutors have declined to comment on that case.

Nojay and two other men were also facing trial in Cambodia on fraud charges, accused of bilking an investor of $1 million in a proposed rice exporting business. Nojay denied fraud was committed.

"All the people I've worked with have been honorable people, but again, some of them have done well, and some of them have stumbled. That's just the nature of small business work," Nojay told Rochester's WHAM radio the day before he died.

Milne, who is mayor of Honeoye Falls, said he ran a "clean and solid race" and was disappointed.

"I really believe we would have fared better with Mr. Nojay still alive," he said.