NASHVILLE — After offering free H.I.V. testing at a drive-through event last year, staff members at Nashville CARES, a nonprofit sexual health clinic, made an alarming discovery: a cluster of positive tests from a single neighborhood.

“There was one person who had unknowingly passed it to multiple partners, and we were able to intervene quickly before it became a full-blown outbreak,” said Lisa Binkley, who leads the clinic’s H.I.V. prevention team.

For this work and other efforts to try to curb the spread of H.I.V. in the Nashville region, Ms. Binkley and her colleagues have relied heavily on federal grant money. So they were stunned when Tennessee’s health commissioner announced earlier this year that the state would no longer accept $8.8 million in federal grant money, which for more than a decade has been distributed among nonprofit groups, county health departments and health care organizations.

Tennessee is the only state to have rejected the funding; Gov. Bill Lee, a Republican, instead plans to allocate $9 million in new state funding for H.I.V. prevention and monitoring in July. The governor said the move would offer the state greater independence in its decision-making. But some organizations say they are concerned that the state will not offer them funding if they do not align with the governor’s conservative positions on issues like transgender rights, and his opposition to abortion access.

“You can’t politicize public health,” said Mia Cotton, the chief programs officer of Friends for Life, a Memphis nonprofit that has received the federal funding.

The state has not announced which groups will receive the funds, or the rules on how they can be used, but the governor’s office has indicated that its priorities include “vulnerable populations, such as victims of human trafficking, mothers and children, and first responders.”

Public health experts say Mr. Lee’s listed examples are at odds with the reality on the ground, as those groups represent only a tiny fraction of new H.I.V. cases in Tennessee, according to a recent report from the AIDS charity amfAR. Some of the highest-risk groups in the state are sexually active gay men, transgender women and those who inject drugs, according to Greg Millett, the director of amfAR and an epidemiologist.

In a letter last month to the Centers for Disease Control and Prevention, which gives out the grants, the state health commissioner, Dr. Ralph Alvarado, cited Governor Lee’s desire to reduce the state’s “reliance on federal funding” and “assume increased independence.”

Jade Byers, a spokeswoman for Mr. Lee, said the new approach would also be more efficient than the “cumbersome” process of receiving C.D.C. grant dollars, which requires organizations to spend their own money and then seek reimbursement from the federal government.

Tennessee currently relies on the nonprofit United Way of Greater Nashville to select the recipients and distribute the federal grant money. No other states have refused C.D.C. funding for H.I.V. prevention and monitoring, according to a federal health official.

The C.D.C. requires that recipients of its H.I.V. prevention and monitoring grants focus on groups that are most vulnerable to H.I.V., using federal data to identify the most vulnerable populations in a particular area. Among the groups identified by the C.D.C. as high-risk are men who have sex with men, transgender people, and Black and Hispanic people. The C.D.C. declined to comment on Mr. Lee’s decision.

At a State Senate committee hearing last week, Senator Jeff Yarbro, a Democrat, asked Dr. Alvarado if the new funding approach would allow Tennessee to “continue focusing the bulk of these efforts where the bulk of the risk is.”

Dr. Alvarado said he “would imagine the same populations” that currently benefit from the C.D.C. funds “will continue to receive benefits.” But he did not say whether organizations and programs that focus on L.G.B.T.Q. populations would be affected by the funding change, nor did the governor’s office when contacted for clarification.

Governor Lee, whose signing of a total abortion ban and proposed tax cuts have been broadly applauded by Tennessee Republicans, has faced questions from within his party of the H.I.V. funding decision.

State Senator Becky Massey, a Republican, asked Dr. Alvarado at the hearing last week if the state planned to continue funding local nonprofits that have been effective at H.I.V. outreach in rural areas.

Dr. Alvarado said he could not answer her question on the record.

Among those who fear that the state will politicize its funding choices is Ray Holloman, who leads the Tennessee Transgender Task Force, a volunteer group that the state health department established in 2018, during the previous administration. The team received an annual budget of $10,000, with the goal of connecting transgender residents to H.I.V. prevention resources; the money came from the C.D.C. grants.

Mr. Holloman said he and his colleagues tried to be discreet about their ties to the state health department.

“We knew from the start, if we got any kind of visibility, they were going to take our funding away from us,” he said.

His fears appeared to be confirmed last fall, when The Daily Wire, a right-wing media outlet, published an article accusing the state task force of moving beyond its original mission of H.I.V. prevention to “promote transgender surgeries and abortion.” A spokeswoman for the governor told the outlet that he did not support the task force.

Mr. Holloman said the allegations were baseless, but, in the weeks that followed, he saw his work unravel. The Tennessee Health Department removed from its website information about the task force and other health resources for trans people, as well as information about the state’s H.I.V. prevention programs. Then, Mr. Holloman learned that the funding for the task force would end on Dec. 31, 2022.  

The task force is currently fund-raising to replace the money previously offered through the C.D.C. grant, and is hoping to continue offering H.I.V. prevention education with nonprofit partners.

Planned Parenthood of Tennessee and North Mississippi, another recipient of the federal H.I.V. funding, was also notified last fall that the Lee administration planned to cut off its access to the C.D.C. grant. In a statement released in January, Planned Parenthood said that it had “attempted to work with the governor’s office following this latest effort, but the state abruptly announced their withdrawal from the federal program altogether.”

For Mr. Holloman and other L.G.B.T.Q. people in Tennessee, the move to eliminate funding to the Tennessee Transgender Task Force is seen as part of a broader attack on trans rights. Governor Lee has approved legislation that bans all gender-affirming treatment, hormone therapies and referrals for transgender children to receive medical care in the state. He also called for an investigation of the Clinic for Transgender Health at the Vanderbilt University Medical Center.

Tennessee lawmakers have also advanced legislation that would block trans people from changing the gender listed on their drivers’ licenses.

Over the past decade, the South has emerged as the epicenter of the nation’s H.I.V. epidemic. People in Southern states account for over half of new H.I.V. cases each year, even though just 38 percent of the U.S. population lives in the region. Shelby County, which includes Memphis, has one of one of the highest rates of new H.I.V. infections nationwide.

Ms. Cotton, of Friends for Life, said there was an extra, hidden cost to Tennessee’s decision to refuse the federal funding. Friends for Life receives approximately $500,000 per year from the C.D.C. grants, and the organization’s status as a federal grant recipient makes it eligible to buy drugs from manufacturers at a steep discount, as part of a program that began in the 1990s to help improve public health in low-income communities.

Without the grant money and the drug discounts, Ms. Cotton said, the Friends for Life clinic would most likely have to close down. Ms. Cotton and other H.I.V. prevention experts across the state have been scrambling to find alternative sources of funding since Dr. Alvarado told the C.D.C. that the state no longer wanted the grant money.

“It’s been scary, because you want to give people consistent health resources, and we just don’t know what’s going to happen come June without the federal money in place,” said Amna Osman, the chief executive of Nashville CARES, referring to the end of the federal grand contract. The organization serves 50,000 people across 17 counties.

Ms. Osman said she and her colleagues were worried about what might happen if they could no longer afford to offer H.I.V. testing; the organization currently receives more than 40 percent of its budget for H.I.V. prevention and education, or $315,000 a year, from the C.D.C. grants.

Last month, Ms. Binkley, Ms. Osman and other CARES staff members brought a mobile clinic to a homeless encampment alongside the Cumberland River in downtown Nashville, offering free H.I.V. and hepatitis C testing, while also distributing test strips that detect fentanyl in street drugs and handing out Narcan, a medicine that can rapidly reverse an opioid overdose.

Minutes after they pulled into an empty lot at the center of the encampments, they set up three folding tables stacked with medical history forms, testing supplies, sandwiches and bottled water.

“Doesn’t matter where we are, everybody always says, ‘Oh, don’t worry, I got tested last week,’” Ms. Binkley said. “People just don’t want to know, a lot of the time. It’s scary to know if you’re positive, but we’re good at setting people at ease.”