The number of gay men in Scotland having unprotected sex has almost doubled over six years, a study says.
Many more gay men reported having unprotected sex
At the same time, unfounded confidence in the HIV negative status of casual partners has also increased, Sexually Transmitted Infections journal says.
The findings, which reflect trends seen in other UK areas, are based on surveys of 6,500 men in Edinburgh and Glasgow.
In 1996, 11% of those surveyed said they had unprotected anal sex - in 2002 the figure was 19%.
Levels of this "risky sex" with casual or multiple partners also increased.
There was also a significant increase in men reporting they "knew" their casual partners' HIV status, despite no increase in HIV testing among the men who reported having unprotected anal intercourse with casual partners.
The likelihood of unprotected sex with casual partners was greater among those men who said they visited gay bars frequently and those who agreed with the statement: "I am less worried about HIV infection now that treatments have improved."
These trends are not limited to the two cities studied, said the report authors.
Professor Graham Hart and Lisa Williamson, of the MRC Social and Public Health Sciences Unit at Glasgow University, said gay men in other UK cities were similarly becoming more blase about practising safe sex.
Professor Hart said: "The concern is that whilst there has been marvellous news about the impact of antiretroviral treatments in keeping people alive, there has perhaps become a sense that safe sex is not as important as it was."
He blamed what he called a prevention failure.
He said a new generation of young gay men were ignorant about the real risks, partly because their peer group is not dying of the disease, thanks to better HIV treatments, and partly due to less focus now on prevention.
He said hard hitting HIV prevention awareness campaigns were needed, similar to those of the 1980s, which included shock tactic TV commercials showing tombstones engraved with the words "Don't die of ignorance", to drive the message home.
"My concern is that this is in great part due to prevention failure. There has been a big redirection towards treatment.
"Monies have not been going into HIV prevention in the way that they had previously, in part to fuel the expense of the drug budget."
He acknowledged that the government was investing significant money to tackle sexual health. But he said efforts needed to be focused on HIV prevention, particularly among gay men, as well as the other sexually transmitted infections.
If not, he warned the consequence could be a rise in HIV infections.
A Scottish Executive spokeswoman said: "We are committed to tackling this issue."
She said the executive had invested significant money in a number of schemes, including over £8.4m to NHS Boards for tackling blood-borne disease such as HIV this year.
A Department of Health spokeswoman said its national Sexual Health campaign would help to raise awareness of the importance of safe sex amongst a very wide audience and would focus on the top five STIs, including HIV.
"However, we are aware that the highest number of HIV cases in the UK are found in gay men and African communities and it is essential that key messages are communicated to these two groups through carefully targeted campaigns," she said.
She said the department was working with charities on targeted health promotion campaigns rather than a more "generic broad-brush approach that may be off message for these groups".
Will Nutland, of the Terrence Higgins Trust, said: "This research comes as no surprise given the continued lack of investment in HIV prevention.
"Unless more money is invested in relevant and targeted HIV prevention, gay men will continue to take risks with their sexual health and the UK's HIV and STI epidemic will continue to grow."