Prime minister David Cameron has urged gay men to use condoms, get tested for HIV and support each other in tackling the virus.

In a message for Boyz magazine for World AIDS Day, he said that HIV infection rates had increased in the last decade.

Mr Cameron also praised the “iconic” and “hard-hitting” tombstone AIDS ads of the 1980s but PinkNews.co.uk understands there are no plans to return to the controversial campaigns.

HIV activists are divided on the ads. Some argue that they “demonise” HIV-positive people, while others argue that a tougher new strategy is needed.

Mr Cameron wrote: “[The tombstone ad] was hard-hitting and thought-provoking. And yes, at times, it made uncomfortable viewing. But that was the point. It had such a positive effect on waking up my generation to the dangers of AIDS.

“More than twenty years on and we have come far. Prejudice is falling – though we still have to fight it. And increasingly effective medical treatments have been found – though there is still no cure and no one should be complacent, treatments are complex and have side-effects.

“However, one area where progress has not been good enough is infection rates. Over the last ten years, they have actually increased.”

Mr Cameron thanked the gay community for its work on HIV but said the fight was “still far from won”.

“You need to support each other in avoiding the virus. You still need to practice safe sex. You need to test and to know your HIV status,” he said. ” And as a society we need to continue to fight prejudice and stigma, especially as they can be a barrier to testing and treatment.

“I talk a lot about responsibility when it comes to my politics. And this World AIDS Day it’s important everyone thinks about the responsibility they have towards themselves, their partners and the wider community. Only together can we fight and then beat HIV and AIDS.”

Alan Wardle, head of health improvement at HIV charity Terrence Higgins Trust, told PinkNews.co.uk: “It is very welcome that the prime minister recognises that HIV remains a very serious issue and that we need to increase focus around testing.”

He added: “There need to be continued [HIV] campaigns, continued testing and efforts to tackle stigma.

“There should also be compulsory sex education in schools – a lot of young gay men are leaving school without any information, making them very vulnerable when they go out in pubs and clubs.”