Representative Chris Collins, Republican of New York, reversed course on Saturday morning and announced he was suspending his campaign for re-election, days after federal prosecutors charged him with insider trading.
Mr. Collins, who was the first member of Congress to endorse Donald J. Trump for president in 2016, had initially vowed to stay on the ballot this fall but said on Saturday that he had decided it was “in the best interests” of his district, “the Republican Party and President Trump’s agenda” to suspend his bid.
Federal prosecutors have charged Mr. Collins with using his seat on the board of a small Australia-based drug company, Innate Immunotherapeutics, to tip off his son and others that the company had failed a critical scientific trial before that information was made public.
His son and others allegedly dumped shares in a frantic rush and averted hundreds of thousands of dollars in losses.
“I look forward to having my good name cleared of any wrongdoing,” Mr. Collins said on Saturday, adding that he would stay in Congress through the rest of his term.
His western New York district, which covers the areas between Buffalo and Rochester, is one of the state’s most conservative, and one in which Mr. Trump had his strongest showing in New York, with nearly 60 percent of the vote in 2016.
Mr. Collins’s indictment immediately thrust his seat onto the national battleground map. But how the suspension of his campaign would play out was not immediately clear. The process to get off the ballot can be onerous in New York, and Mr. Collins did not say how he would remove himself.
One Republican official familiar with the discussions said the party would probably try to nominate Mr. Collins for a county clerkship somewhere else in New York, in an effort to meet the legal requirements to remove him from the congressional ballot.
But further complicating matters are New York’s byzantine election laws: Mr. Collins is slated to be on the ballot not just on the Republican line but also as an Independence Party candidate. That party, too, would have to agree and find a way to remove him.
The Democratic candidate in the race, Nate McMurray, the town supervisor of Grand Island, had only $80,000 in his campaign account when the indictment was announced — far less than is typically needed to wage an aggressive challenge.
Mr. McMurray had not been the preferred candidate of Democratic leaders in New York, led by Gov. Andrew M. Cuomo, who had recruited Lt. Gov. Kathy Hochul for the seat. She declined and instead ran for re-election.
One Republican said the party hoped to run Stefan Mychajliw, the Erie County comptroller, to replace Mr. Collins, though others are also expected to jockey for the party’s nomination. In a preview of what will most likely be a polarized and partisan race over the next three months, Mr. Mychajliw called Mr. McMurray “radical” three times in a four-paragraph statement.
If Republicans can successfully remove Mr. Collins, whoever they replace him with would have an edge given the district’s conservative tilt. Even after the indictment of Mr. Collins, nonpartisan political handicappers said the seat would be a steep climb for Democrats.
“I respect Chris Collins’s decision to step down while he faces these serious allegations,” Representative Steve Stivers, an Ohio Republican and the chairman of the House Republican campaign committee, said in a statement. “As I’ve said before, Congress must hold ourselves to the highest possible standard.”
Democrats hope to use the details of the charges against Mr. Collins outlined in the indictment to help paint both the Trump administration and the Republican-controlled Congress with the broad brush of a “culture of corruption.”
While no other Republicans in Congress have been charged with any wrongdoing related to Innate Immunotherapeutics, five other lawmakers also purchased stock in the company in January 2017: John Culberson of Texas; Michael K. Conaway of Texas; Doug Lamborn of Colorado; Billy Long of Missouri, and Markwayne Mullin of Oklahoma. The latter two serve on the same health subcommittee of the House Energy and Commerce Committee as Mr. Collins.
Geoffrey S. Berman, the United States attorney in Manhattan who announced the indictment, declined to say if other lawmakers were currently under investigation. “No comment,” he said on Wednesday after the charges were announced against Mr. Collins.
The issue of Innate first burst into public a year and a half ago, when it was revealed that Tom Price, Mr. Trump’s nominee to serve as secretary of the Department of Health and Human Services, had received privileged shares of the drug company, in which Mr. Collins was the largest shareholder.
Mr. Price resigned last September in an unrelated scandal about his use of chartered flights.
In announcing the indictment of Mr. Collins, Mr. Berman said, “Congressman Collins, who by virtue of his office helps write the laws of our nation, acted as if the law did not apply to him.”
Mr. Collins, who had previously faced an ethics investigation in Congress for his dual role as congressman and investor in Innate, had told investigators that he hoped the drug company, which was testing an experimental treatment for multiple sclerosis, would be a key part of his legacy in life.
“Of all the things I will accomplish in my life,” Mr. Collins told investigators, “this will be number one on my tombstone.”