Watch: Mohammed bin Salman walks over roof of Mecca's Kaaba, Islam's holiest site
MbS, son of the king whose official title is "Custodian of the Two Holy Mosques of Mecca and Medina", came to the site on Tuesday to inspect expansion works in the Grand Mosque complex.
The prince acts as chairman of the Royal Commission for Mecca City and the Holy Sites, which oversees renovation and maintenance works.
The state-run Saudi Press Agency circulated a series of photos showing the crown prince at different spots in the mosque.
MbS entered the Holy Kaaba, a cube-shaped building in whose direction Muslims around the world pray five times a day, and climbed up on to the roof for a better view of the surrounding structures.
The courtyard and the circumabulation area, where Muslims pray and perform the Hajj and Umrah pilgrimage each year, looked empty, after the police reportedly evicted worshippers for the benefit of the royal guest.
According to Saudi media, he prayed and kissed the Black Stone, an Islamic relic which according to tradition dates back to the time of Adam and Eve.
Few Muslims get the chance to touch it, let alone enter or climb the Kaaba. And such unrestricted access to the holy site given to Saudi royals and dignitaries, often at the expense of ordinary worshippers, has long been controversial.
But MbS' record leading the disastrous war in Yemen and ordering the kind of crackdown on dissent that has led to the murder of journalist Jamal Khashoggi has caused further outrage, with some Muslims saying the crown prince does not deserve the honour.
On Twitter, a hashtag on the visit was quickly used to recall his record.
"(Being in Mecca) will not cleanse him of the blood of Jamal Khashoggi, the torture of female activists, the detention of scholars and activists...and the blood of Yemen's children," tweeted Turki al-Shalhoub.
Khashoggi, a Washington Post columnist who wrote critically about the Saudi crown prince, was killed inside the Saudi consulate in Istanbul on 2 October, likely at the orders of the young but powerful royal, intelligence services have said.
The CIA believe Mohammed bin Salman ordered an operation to kill Khashoggi, and say his body was dismembered and removed to a location still publicly unknown.
Earlier this month, a UN Special Rapporteur leading an independent inquiry into the Khashoggi killing called the act a "brutal and premeditated killing", planned and perpetrated by Saudi officials.
The whereabouts of Khashoggi's body is still unknown.