The Vatican has confirmed a ban on Catholics becoming Freemasons, a centuries-old secretive society that the Catholic Church has long viewed with hostility and has an estimated global membership of up to six million.

"Active membership in Freemasonry by a member of the faithful is prohibited, because of the irreconcilability between Catholic doctrine and Freemasonry," the Vatican's doctrinal office said in a letter published by Vatican media on Wednesday.

The department, known as the Dicastery of the Doctrine of the Faith, issued its opinion, dated Nov. 13 and countersigned by Pope Francis, in response to a bishop from the Philippines alarmed by the growing number of Freemasons in his country.

The same office said last week that transgender people can be baptized, serve as godparents and act as witnesses at Catholic weddings.

The letter on Freemasons cited a 1983 declaration, signed by the late Pope Benedict XVI, at the time the Vatican's doctrine chief, stating that Catholics "in Masonic associations are in a state of grave sin and may not receive Holy Communion".

Masonic lodges are normally male-only societies, associated with arcane symbols and rituals. They have also sometimes been linked to conspiracy theories alleging undue influence on world affairs.

According to the United Grand Lodge of England, modern Freemasonry "is one of the oldest social and charitable organisations in the world", rooted in the traditions of medieval stonemasons.

The group says it has 180,000 male members, with two parallel female lodges in England having another 5,000 members, and estimates global Freemasonry membership at around six million.

It lists the late Queen Elizabeth's husband Prince Philip, former Prime Minister Winston Churchill, late actor Peter Sellers, former England soccer manager Alf Ramsey and authors Rudyard Kipling and Arthur Conan Doyle as famous Freemasons from the past.