The ban in Mecca's Masjid al-Haram, also known as the Great Mosque of Mecca, and Medina's Masjid an-Nabawi, or The Prophet's Mosque, was imposed on Nov 12 by the Saudi Foreign Ministry, The Daily Sabah newspaper in Turkey reported on Thursday.
Indonesia's The Jakarta Post reported on Friday that the ruling was communicated by Saudi's Foreign Ministry through a diplomatic note sent to accredited representatives of foreign countries on Saudi Arabian soil, including Indonesia's embassy in Riyadh. It said the embassy received the letter on Nov 15.
The Saudi authorities stated that the measure was meant to protect and preserve the holy sites, prevent disturbances of worshippers and ensure tranquillity while performing acts of worship.
In recent years, many pilgrims to both holy sites have posted pictures on Instagram and Facebook, showing them posing in front of the Kaaba, to standing under the umbrella-like canopies at Nabawi Mosque.
Some have even posed in groups, carrying banners or flags of their respective countries in the yards of the two mosques.
Critics have said that such "touristy acts" detracted from the essence of a pilgrimage as they raised questions about whether the pilgrimage was just a trip to take photos.
"In the case of any violation of the ban, security guards have been instructed to confiscate the photos and the camera if needed," the Saudi statement said, adding that the change should be disseminated to every haj and umrah tour operator in their respective countries.
According to The Jakarta Post, many Indonesians have reacted with disappointment to the news, saying that photos and videos taken at the mosques were meant to be mementos, especially as visiting the sites may be a once-in-a-lifetime opportunity.