The Catholic church, already reeling from a string of clerical sex abuse scandals, is facing new embarrassment after an Italian magazine published an investigation into what it termed the double life of gay priests in Rome.

Using hidden cameras, the weekly Panorama, owned by Italy's prime minister, Silvio Berlusconi, captured priests visiting gay clubs and bars and having sex. The Vatican does not condemn homosexuals, but it teaches that gay sex is "intrinsically disordered". In one of his earliest moves, pope Benedict barred actively gay men from studying for the priesthood.

The diocese of Rome lashed out at the prime minister's magazine, saying its aim was "to create scandal [and] defame all priests". But it also urged gay clerics to leave both the closet and the priesthood.

It said, "Consistency would require that they come into the open", but that they "ought not to have become priests".

The semi-official papal daily, L'Osservatore Romano, made no reference to the affair. Vatican Radio reported it briefly.

One priest, a Frenchman in his 30s identified as Father Paul, attended a party at which there were two male prostitutes then said Mass the following morning before driving them to the airport, Panorama reported. A photo on its website claimed to show the priest in his dog collar but without his trousers with a gay man who acted as decoy for the magazine. In other shots, priests were shown apparently kissing Panorama's collaborator.

A member of the clergy quoted by the magazine put the proportion of gay priests in the Italian capital at "98%". The Rome diocese insisted the vast majority of priests in the city were "models of morality for all", while adding that the number of gay clergyman was "small, but not to be written off as isolated cases". A review eight years ago of research on the American church concluded that between a quarter and a half of seminarians and priests there were homosexual.

A former Italian MP and gay activist, Franco Grillini, said: "If all the gays in the Catholic church were to leave it at once – something we would very much like – they would cause it serious operational problems."

Another well-known spokesman for the gay community, Aurelio Mancuso, condemned Panorama's investigation as a "horrible political and cultural operation", but agreed that if priests in Rome were to follow the advice given to them in yesterday's statement, it would "paralyse" the diocese.

In March, the pope's own household was rocked by scandal when court documents revealed a Vatican chorister had procured male prostitutes for a papal gentleman-in-waiting.