The two-year deal is for the London HIV Prevention Programme (LHPP), a £3.4 million three-year programme which delivers services such as condom distribution to help lower the rates of HIV infection. Media spend is £1.3 million.
It is funded by London's 33 boroughs and includes the voluntary sector and the NHS. The agencies will help LHPP increase HIV testing and reduce the rates of new infections.
Enter will handle the creative work and enlist the help of Red Door, a Creston agency, to handle the PR and events. The pitch was won by Team Enter, which is made up of Enter and Creston.
MG OMD will take charge of media planning, and Carat will handle the media buying.
Agencies lined up for the account in September when the Crown Commercial Service issued a brief. The pitches took place in October.
In November last year Public Health England said the number of people infected with HIV in the UK reached a "record high" of 108,000. It said more than a quarter of people do not realise they are infected.
It also found that rates of undiagnosed infection among gay men and African communities were "especially high" in London.
Mayor Jules Pipe, the chairman of London Councils, said: "This is a major step forward for the London HIV Prevention Programme, which is being led by the London Borough of Lambeth on behalf of all Londoners.
"This programme complements existing services commissioned locally by individual boroughs and plays an important role in helping to support those communities most at risk.
"It will also provide us with an effective city-wide platform from which to get across vital messages around safer sex and HIV testing."
Paul Steinberg, Strategic Lead Commissioner of the LHPP, said: "Our newly appointed partners are widely recognised as longstanding experts in their respective fields.
"We look forward to working with them to increase HIV testing and reduce the rates of new infections by engaging with local communities most at risk of HIV."