Only 40 percent of U.S. adults have ever been tested for HIV, and fewer than a fifth of the people at high risk for developing the infection are receiving the medication that prevents it, the government reported Tuesday.

Dramatic improvement in testing and prevention, and better treatment of people who already have HIV, are urgently needed if the government is to reach President Trump’s goal of virtually wiping out transmission of the infection by 2030, the Centers for Disease Control and Prevention said.

“We can get it done. We can end the status quo, provided we change our expectations and the culture of satisfaction with where we are now,” Jay C. Butler, the CDC’s deputy director of infectious diseases, said during a telephone briefing for the media.

To further that goal, the government also announced that, beginning in March, three major pharmacy chains would distribute the “pre-exposure prophylaxis” medication Truvada to people without prescription drug coverage.

The announcement by Health and Human Services Secretary Alex Azar expands government efforts to provide the highly effective medication to more people at risk of contracting HIV, including African American and Latino men who have sex with men, intravenous drug users, people with mental illness and the homeless.

Azar estimated that about 200,000 uninsured people would be eligible for the free medication after they test negative for HIV and receive a prescription. Information on the program is available at getyourprep.com.

In May, the government announced that it had struck a deal with Gilead Sciences, which makes Truvada, to donate 2.4 million bottles of the once-a-day pill for 11 years. Although a generic version sells for just $60 a year in Africa, the medication costs about $20,000 annually in the United States.

Gilead’s patent will expire next year, opening the U.S. market to a generic version. The company already has announced a patented successor, Descovy.

In November, HHS sued Gilead, alleging the company ignored government patents on the drug as it earned billions of dollars selling it. Azar said the Truvada donation and distribution program would continue through the end of next decade despite the legal battle.

The CDC’s message on HIV was grimmer, as it has been in recent years. Progress on preventing new infections has stalled since 2013, with about 38,000 people acquiring the virus every year since then, Butler said. More than 850,000 people have been diagnosed with HIV, but another 150,000 have the infection and don’t know it, he said.

Among those who have been diagnosed, just 62.7 percent had suppressed the infection with medication, despite the availability of drugs that can bring the virus down to undetectable levels in the blood. Achieving that level of viral suppression can make it nearly impossible to transmit the virus to another person and allows people with HIV to live normal life spans.

The portion of at-risk people who received preventive medication in 2018 is up 5 percentage points from the previous year, but, at 18 percent, it is much less than the government’s goal of 50 percent.

In his State of the Union address in February, President Trump announced a plan to virtually end transmission of HIV by 2030, by focusing resources on 48 U.S. counties, the District of Columbia, San Juan, Puerto Rico and rural parts of seven states where the disease is most prevalent.