The coronavirus took an immediate toll on U.S. Customs and Border Protection, and in the first months of the outbreak, the agency’s memorial pages highlighted the sacrifices of those killed through “diligent service to country during a worldwide pandemic.”

Dozens more names have been added to the memorial since then, marking the deadliest span in the agency’s history. But in recent months, CBP has not called attention to the deadly pathogen that killed them, leaving out any mention of the virus.

Police departments across the country are struggling with vaccine hesitancy, but at CBP, the nation’s largest law enforcement agency, the politics are especially fraught. With immigration arrests along the Mexican border soaring to the highest levels in decades, Republican lawmakers blame the Biden administration’s policies for exposing U.S. agents to greater risk, even as they denounce vaccine mandates that would help protect them.

President Biden’s order mandating federal employees to be fully vaccinated next month has generated anger in CBP’s ranks, particularly among conservative-leaning U.S. Border Patrol agents and the union that represents them. In recent weeks, leaders at the National Border Patrol Council (NBPC) have joined Republican lawmakers who allege the Biden administration is allowing migrants to spread the coronavirus in the United States and placing the CBP workforce at greater risk, while also opposing his vaccination order.

At least 47 CBP employees have died of covid-19 as of Tuesday , according to the agency, including one Border Patrol agent last month who was days from retirement. More than 11,400 have been infected with the deadly pathogen, about 19 percent of the workforce.

CBP does not publish a full breakdown of the covid-19 deaths by its sub-agencies, but the most dramatic spike in deaths this year appears to have been in the Border Patrol. The death toll in that agency has risen from three agents in 2020 to 11 so far in 2021, according to the union, media reports and online memorials.

Five Border Patrol agents died of covid-19 in September alone. The dead include two men in the San Diego sector, each with a wife and three children, according to the sector’s posting on Facebook, which said only that they died “after struggling with a short term illness.”

One commenter asked: “Didn’t they die of COVID? if so, why not say so?”

CBP officials said they did not disclose the information for privacy reasons, but the union confirmed they died of covid-19.

The NBPC does not encourage members to get vaccinated and has said it would like to file a legal challenge to Biden’s mandate that all federal employees be immunized by Nov. 22, but it has not yet found lawyers willing to take the case.

The union president said the rising deaths saddened him but that the vaccines remain a “personal choice.”

“We are 100 percent opposed to a mandate for a vaccine that still, to this date, has proven that you can still get covid. We think that this is political,” Brandon Judd, president of the NBPC, said in an interview. “We believe that people should have the right to choose. If they choose to get vaccinated, good for them. If they choose not to, I think that’s their choice.”

Judd said he is vaccinated. The Centers for Disease Control and Prevention says vaccines prevent severe illness and death, but the virus has remained the top killer of law enforcement officers in 2020 and 2021, said Chris Cosgriff, executive director of the Officer Down Memorial Page, which records all line-of-duty law enforcement deaths. The site does not track vaccination rates, but Cosgriff said some of those who died were vaccinated and many were not.

Customs officer deaths have outpaced the Border Patrol’s, as border agents tend to work outdoors and process fewer travelers daily, but they have slowed this year. At least 28 Customs officers have died of covid-19, according to online memorials and obituaries, including about a dozen this year.

In a typical year, CBP officers and agents process 1 million travelers a day, a number that slid to 650,000 during the first year of the pandemic as illegal immigration and travel and trade slowed. But air and sea travel has resumed and, together with illegal border crossings, their exposure has increased.

Front-line workers had early access to the vaccine, but Border Patrol Chief Raul Ortiz said in an Aug. 9 interview with The Post that vaccination rates varied widely, from a low of 30 percent of agents in the Rio Grande Valley sector in Texas, the busiest stretch on the Southwest border, to as high as 78 percent in other sectors along the border.

More than 70 percent of the CBP workforce has responded to voluntary surveys on vaccination status, and of those, 80 percent said they were immunized as of Sept. 21, CBP officials said in an email.

The agency has not said how many of the dead were unvaccinated. They include decorated military veterans, the parents of young children, and grandparents nearing retirement themselves. Most are men. They were special agents, agriculture inspectors, senior officers and members of tactical units.

Their deaths devastated families and co-workers, who wept at their funerals and started online fundraisers to pay medical expenses.

Edgardo Acosta-Feliciano, a big, broad-shouldered agent who patrolled the remote mountains and deserts of southern New Mexico, fell sick in mid-May. He told his wife it was the flu, and he trudged to work for two days, until he was gasping for breath.

Acosta-Feliciano and many of his co-workers didn’t get the vaccine, said his wife, Astrid Negroni. Neither did she.

“He was a veteran, and he got a lot of vaccinations in the Army, but he didn’t want it,” Negroni said, adding that he felt at the time that the vaccine was “experimental.”

Acosta-Feliciano battled the disease for two grueling months, spending his final weeks on a ventilator. He died July 31 at age 48.

“He was a strong, healthy person,” Negroni said, adding that she thinks he fell ill on the job. “He suffered so much.”

The FDA granted full approval to the first coronavirus vaccine in late August, but Negroni remained unconvinced. “Who trusts the government?” she said. “We don’t believe the Democrats, and Fauci,” referring to Anthony S. Fauci, director of the National Institute of Allergy and Infectious Diseases and a leading administration voice on combating the pandemic.

Federal employees who remain unvaccinated will need to get their first shots by mid-October to meet the requirements of Biden’s mandate.

Rep. Jim Jordan (Ohio), the ranking Republican of the House Judiciary Committee, and Rep. Tom McClintock (Calif.), the ranking Republican of the subcommittee on immigration and citizenship, wrote Homeland Security Secretary Alejandro Mayorkas a letter last month criticizing him for “threatening to terminate a significant portion of the Customs and Border Protection (CBP) workforce.”

“It is simply unbelievable that the Biden administration will allow COVID-positive illegal aliens to surge across the border but will terminate dedicated law-enforcement officers who do not comply with President Biden’s mandate,” they wrote.

DHS officials have said they want to protect their workforce, not fire them.

Several agents said they expect most of their co-workers will eventually relent and grudgingly get the vaccine, including one, a paramedic working in the Rio Grande Valley, who said he’d take the “least-worst one.”

“Just because I work for the government doesn’t mean I trust them,” said the agent, who, like others, spoke on the condition of anonymity because he was not authorized to speak to reporters.

“Those who don’t want it should not be forced to take it under duress or the threat of job loss,” he said. The mandate allows exemptions for those with medical or religious beliefs.

Another border agent in Arizona who supports the vaccine and got his shots early this year said he’s seen his co-workers “furious” about Biden’s mandate.

“If anything it’s made them more defiant,” he said. “It’s become a point of pride for some agents, saying they’ll never get it. I suspect more agents will get it, but they’re going to wait until the last minute.”

The agent said he’s gotten so accustomed to placing a black mourning bands over his badge that “it’s just easier to leave it on all the time now.”

“There have been so many deaths,” he said. “It seems like the flags are always flying at half-staff.”

Arelis R. Hernández and Alice Crites contributed to this report.