Prince Harry and Rihanna have taken HIV tests together in Barbados to raise awareness of the virus on World Aids Day.

The pair, who appeared on stage together on Wednesday night at Barbados’s celebrations of the 50th anniversary of independence, had the finger-prick procedure during a visit to a HIV drop-in centre targeting men in the capital, Bridgetown, on Thursday.

Harry had a public HIV test during the summer in London and admitted to being nervous before the result came back negative. The prince has been campaigning for months to encourage more people to come forward and be tested for infection with the virus, which can now be managed with drugs.

During a visit to a Barbados hospital on Wednesday, Harry, who is touring the Caribbean, met paediatric consultant and HIV expert Dr Alok Kumar, and told him: “I want to say to everyone who hadn’t been tested – get tested, regardless of who you are, your background, culture or religion.”

Referring to the success of anti-retroviral medicine in helping patients, he said: “Because of the success of these drugs, which is great, we are now suffering from complacency and risk going back 10 or 20 years.”

The Barbados National HIV/Aids programme has highlighted men as being at significantly high risk. They are more likely to be diagnosed late with HIV compared with women and are more likely to die from Aids-related illnesses.