The United Nations on Tuesday adopted new targets for ending AIDS as a public health threat by 2030, a target that most countries could seemingly easily agree to. But consensus was elusive.

In early negotiations on what is known as the Political Declaration, the United States and the European Union fought to outlaw policies and laws that stigmatize or even criminalize high-risk groups – and drastically scaled back measures to relax patent protection for HIV drugs .

The UN Declaration sets priorities for the global fight against AIDS and guides national policy. There are also opportunities for global health groups and civil society organizations to put pressure on governments to honor their commitments.

After several days of intensive work by delegates from some countries and skilful negotiations by others, the member countries adopted a final version of the declaration on Tuesday morning. The final draft includes an important new goal of having most nations reform discriminatory laws so that less than 10 percent of the world’s countries would take action that unfairly targets people at risk of or living with HIV

“These laws drive the most severely affected by HIV away from HIV prevention and treatment,” said Matthew Kavanagh, director of the Global Health Policy and Politics Initiative at Georgetown University. “This could be a vital tool to get the world back on track to end AIDS.”

On Monday, Dr. Kavanagh and colleagues have a new piece of work showing that countries that criminalize same-sex relationships, drug use, and sex work have had far less success in fighting HIV

But the declaration does not move the needle to patent protection. The United States was among the nations whose delegates significantly watered down or shortened the language to relax patents to provide better access to affordable HIV medicines in low and middle income countries, an attitude endorsed by the Biden government directly contradicted patent waiver for Covid vaccines.

“The mixed messages from the government in the face of recent support for the waiver of Covid-19 vaccine patents are confusing and disappointing,” said Annette Gaudino, director of policy at the Treatment Action Group, an advocacy group in New York. “This would by far not be the first time the US has put drug company profits above people and public health.”

The UN brings together heads of state, health ministers and non-governmental organizations to set priorities for the fight against the HIV pandemic every five years. At a similar meeting in 2016, member countries agreed to aim for less than 500,000 new HIV infections per year, less than 500,000 AIDS-related deaths and the eradication of HIV-related discrimination by 2020.

The world did not achieve these goals: in 2020 around 1.5 million people became infected with HIV and around 690,000 died.

Ending AIDS by 2030 was an ambitious goal adopted by the UN in 2015 as part of a broader agenda for sustainable development. But without more advanced policies and laws, the goal is not achievable, said Dr. Kavanagh.

“To end AIDS by 2030, governments must commit to taking a people-centered, rights-based approach to HIV, working on policy and legal reform, engaging and supporting communities, and ending inequalities,” said Winnie Byanyima, Executive Director from executive UNAIDS said in an email statement.

The original draft of the April 28 statement included a commitment to end “criminal laws, policies and practices, stigma and discrimination based on HIV status, sexual orientation and gender identity.”

Delegates from a few countries, including the Africa Group, China, Russia and Iran, tried to erase allusions to sexual or gender identity or to sex education for girls. This has only partially succeeded: the current text calls for prevention approaches that are tailored to risk groups, including sex workers, men who have sex with men, drug users and transgender people.

Delegates from African countries have successfully inserted a language in which they reaffirm “the sovereign rights of member states” and emphasize that the commitments in the declaration would be implemented “in accordance with national laws, national development priorities and international human rights”. About half of the countries where homosexuality is illegal are in Africa.

The declaration in its current form also calls on countries to “empower women and girls to take care of their sexual and reproductive health and reproductive rights,” a section that Saudi Arabia, Russia and the Holy See attempted remove the text.

Representatives from Belarus, China and Russia also deleted a section calling on member countries to recognize citizens’ autonomy in matters of sexuality; its replaced text encouraged “responsible sexual behavior, including abstinence and fidelity”. The final document has been reverted to the original text.

Including language through high-risk groups is critical to success, some experts said. Gays and other men who have sex with men, people who inject drugs, and female sex workers are almost 30 times more likely to have HIV than the general population.

If these groups don’t have access to preventive therapy, clean needles, condoms, or education, “we will undermine the possibility of actually ending AIDS by 2030,” said Eric Sawyer, an advocate for people living with HIV and long-term survivors.

An early draft of the declaration also contained a longer section aimed at relaxing patent protection. Under the current global rules, only the 50 least developed countries are allowed to delete patents on pharmaceutical products in order to distribute them to citizens.

The draft called for “an indefinite moratorium on international intellectual property regulations for drugs, diagnostics and other health technologies”. Representatives from the United States and Switzerland deleted this section. A representative from the European Union said: “This is not the place to discuss these general issues.”

The United States also added language to the reduced version to recognize the “importance of the intellectual property rights regime in contributing to a more effective AIDS response.”

Activists said an anti-patent waiver stance was perfectly consistent for the European Union, which also spoke out against waiving patents on Covid vaccines. Vaccine manufacturers have argued that patent protection is essential to fuel innovation.

Citing the urgent need for vaccines, however, Biden government officials have said they would support a patent waiver that would allow companies to manufacture cheaper versions of the vaccines for the rest of the world.

Given this trend, “it would be really inconsistent” for the US to oppose a relaxation of patent protection for HIV drugs, said Brook Baker, law professor at Northeastern University and senior policy analyst with the Health Global Access Project, an advocacy group.

“Why in the world should the US be talking on a seemingly almost identical subject from two sides of the mouth?”