Mr. Mater is now publishing these photos, and more than 600 others, in a book that aims to showcase often-hidden aspects of the holy city.
The book, “Desert of Pharan: Unofficial Histories Behind the Mass Expansion of Mecca,” provides an unvarnished photographic catalog of the city: labor camps for foreign workers; slums where undocumented residents live; aerial views of scores of construction cranes surrounding the Grand Mosque; and luxury hotel rooms where wealthy pilgrims can get a bird’s-eye view of the Kaaba, the cubic structure toward which Muslims pray.
By documenting the changes in Mecca, Mr. Mater has taken on a subject of prime importance to both the Saudi government and the royal family. The legitimacy of the Saudi king is so tied to his stewardship of the holy sites that he bears the title “The Custodian of the Two Holy Mosques,” meaning those in Mecca and Medina.
In recent years, the Saudi government has invested billions of dollars on massive infrastructure projects to expand access to the holy sites for increasing numbers of pilgrims. All Muslims who are financially able are required to make the pilgrimage to Mecca at least once in their lives.
It is unclear how the government will respond to Mr. Mater’s unofficial view. In showing aspects of the city that are often unseen by the pilgrims, he has exposed Mecca’s scruffy edges and what he calls the “violence” of how the government has altered its landscape and urban fabric.
Mr. Mater, who is Muslim, said he did not oppose the government’s goal of expanding access to the holy sites, but disagreed on how it should be done. He is uncomfortable with the extent that business interests, rather than human or spiritual concerns, have influenced the expansion. Many of his photos, for example, show the construction of the Makkah Royal Clock Tower, a skyscraper that houses a luxury hotel and looms over the Grand Mosque.
“The hajj is based on the concepts of equality and simplicity, but what has happened now is direct investment,” Mr. Mater said. “There is big business in the middle of this expansion.”
His former career as a physician also influenced how he viewed the city, and he spoke of Mecca as a living being that needs the least-intrusive treatment possible.
“Imagine if you have a patient, and you do hundreds of operations on this patient at the same time,” he said. “You will kill your patient.”
Mr. Mater spent more than five years exploring Mecca, patiently working to gain access to all aspects of the city. He befriended foreign laborers by taking their photographs and giving them copies. In return, he said, they would help him visit their work sites.
The resulting photos show the scope of the construction projects — from groups of mechanical diggers flattening mountains to work crews knocking down apartment buildings. They reflect the lives of the laborers, who are mostly Muslims from South Asia, and their cramped lodgings, but also their pride at working near the holy sites.
Mr. Mater’s photographs captured the often jarring juxtapositions of the sacred and the commercial, a House of Donuts near the city’s entrance, and a gleaming mall near the Grand Mosque.
He also ventured away from the pilgrimage sites, with one chapter in his book dedicated to a large slum inhabited by undocumented Burmese immigrants, and another on the homes and celebrations of the city’s prominent families.
“The story of Mecca is the story of a living settlement,” Mr. Mater said.
He also photographed the city from above in multiple helicopter flights, taking in, among other things, the abundance of fluorescent green lighting, which he said gave the city “a Las Vegas feeling.”
Mr. Mater also often relied on high-level contacts to make his work easier. He received help from the governors of Mecca and Medina, both of whom are princes in the royal family and have previously supported Saudi artists.
“I don’t know if they will like the book or not,” Mr. Mater said, given its documentation of aspects of the city that many Saudis would rather outsiders not see. “But it is my opinion in the end.”
The book was published in Europe in September, and was released in the United States last month, but it is unclear if it will be sold in Saudi Arabia. Mr. Mater has submitted a copy to the Ministry of Culture and Information, which must approve all books sold in the kingdom, but has yet to hear back.
The ministry did not respond to a request for comment.
The son of a Saudi military officer, Mr. Mater, 37, grew up in a village in southern Saudi Arabia near the border with Yemen, surrounded by cows and sheep. He became interested in art during medical school, and then worked at a government hospital in the southern city of Abha.
He quit after five years because his interest in art had grown, he said, while the space for it in Abha had shrunk because of rising religious conservatism.
The area is known for being the home of some of the Sept. 11, 2001, hijackers, one of whom, Ahmed al-Nami, Mr. Mater had known.
“He used to play the oud,” Mr. Mater said, referring to the stringed musical instrument. “Then all of a sudden he disappeared.”
Mr. Nami was aboard United Airlines Flight 93, which crashed near Shanksville, Pa.
Throughout the 2000s, it became more difficult for Mr. Mater and his artist colleagues to operate. In 2011, he and his wife, the artist Arwa al-Naemi, moved to the less conservative city of Jidda. There, they opened Studio Pharan, named after an ancient term for eastern Arabia that appears in the Hebrew Bible.
The studio is now a hub for the city’s young artists, writers and filmmakers. It features open work spaces, a library of art books and literature, and a foosball table where Mr. Mater and his friends play fierce matches late into the night.
Although he lives in Jidda, he says that Mecca has tremendous importance for the world’s Muslims as “a symbolic city” whose healthy development could guide the growth of other Muslim communities.
“It is the role model, so if the role model is good, it will reflect on the world in a better, more merciful way,” he said. As an example, he said he would like to see Mecca developed with satellite cities that respect the local environment and are connected by public transportation.
But as a doctor, he has hopes for the city’s future.
“There is a prognosis, and Mecca is O.K.,” he said. “Mecca is not in the shape it should be in, but nothing is too late. It is possible for Mecca to find solutions.”