The Spanish Mosque, known locally as Jemaa Bouzafar, was constructed in 1928 during the Spanish occupation of northern Morocco. It represents a distinct era of the Rif War when the Spanish military attempted to establish a religious and cultural presence in the fiercely independent mountain town of Chefchaouen. Architecturally, the building displays a simplified Neo-Moorish style, featuring a square minaret that mimics traditional Moroccan designs but with certain European proportions that feel slightly out of place. It stands alone on the hillside, separated from the dense blue clusters of the medina by a deep valley carved by the Ras el-Maa spring.
Despite its religious architecture, the building never functioned as a house of worship for the local community. The residents of Chefchaouen boycotted the site because it was commissioned by colonial forces, viewing it as an intrusion rather than a genuine gift. This political resistance left the building to fall into disrepair for decades until a restoration project in 2007 stabilized the masonry and white-washed the exterior. Today, it serves as a secular viewpoint rather than a mosque—a silent observer of the city history that most hikers pass without realizing its failed purpose.
The journey begins at the eastern edge of the medina, specifically at the Bab al Ansar gate where locals gather to wash laundry in the mountain streams. You must cross the small stone bridge over the Ras el-Maa waterfall to find the start of the dirt trail. This path winds upward for roughly 1.5 kilometers, gaining enough elevation to offer a full perspective of the town layout. While the trail is wide enough for two people to walk side by side, it consists of loose gravel and packed earth that can become surprisingly slick if there has been any morning dew or light rain. I suggest wearing shoes with decent grip—flip-flops are a common sight but often lead to stumbles on the descent.
Sunset is the undisputed peak hour for visiting the Spanish Mosque, drawing dozens of travelers who sit on the low stone walls to watch the lights flicker on across the blue city. If you prefer a solitary experience, the hour immediately after sunrise provides exceptional light for photography without the presence of the evening crowds. During the mid-afternoon, the heat can be intense as there is absolutely no shade along the path or at the summit. The hike usually takes between 15 and 45 minutes depending on your pace and how many times you stop to photograph the prickly pear cacti lining the route.
While the hike is relatively short, the elevation change of about 100 meters provides a modest workout for those not used to mountain air. The path remains unlit at night, which makes the walk back down after sunset a bit precarious for those without a flashlight or a charged smartphone. In my experience, the trail is safest when traversed in a group, although the popularity of the sunset view means you will rarely be truly alone. There are no handrails along the steeper sections, so keeping a steady pace is more important than rushing to catch the final rays of light.
There are no permanent shops or bathrooms at the top of the hill, so you should handle your business before leaving the medina. You will frequently find local vendors near the mosque entrance selling fresh orange juice for about 10 to 15 MAD or offering rides on decorated horses for a few minutes of photography. These vendors usually disappear shortly after the sun goes down, taking their supplies with them. It is wise to carry a bottle of water even for this short excursion as the dry mountain air can lead to quick dehydration during the summer months.
No entrance fee is required to access the trail or the grounds surrounding the mosque as the site is open to the public for free. The building itself is typically locked to prevent vandalism, so your visit will focus on the exterior architecture and the panoramic views.
Most visitors reach the summit in 20 to 30 minutes of steady walking from the Ras el-Maa waterfall area. The total round trip usually takes about one hour including time spent at the top taking photos and resting.
The trail is generally safe due to the high volume of tourists, but the lack of artificial lighting means you must bring a light source for the descent. Stick to the main path to avoid loose rocks and watch for uneven terrain that is difficult to see in the dark.
Visitors are generally not allowed inside the mosque because it is a deconsecrated building that remains locked most of the year. The primary draw of the location is the outdoor terrace which offers the most famous view of the blue city.
Cedrique Relaxing, peaceful, nice walk, wild flowers and views! And cats :) maybe bring them a treat, they'll be happy!
Alywin Tan Take a slow walk from the Medina to the Spanish Mosque for a great view of the sunset in Chefchaueon in Morocco! The walk is easy and relaxing and view is stunning.
Alnoor Can’t go inside as abandoned. Will urge everyone to go as it is not as high as it appears. Path is pleasant and very walkable. Even someone in our group not fit at all managed to do it with only a couple of stops. View is great. Don’t be fooled by sunset as the sun only goes behind the mountain and does not really change colour to dusk.
Mohamed Ait-Ha The mosque was built by the Spanish in the 1920s, but never used. It fell into disrepair and remains closed, but the grounds out front make for a perfect place to behold the blue city and watch the sunset dip behind the green hills with a freshly squeezed orange juice in hand.
Michael Vazquez Perez Nice view of Chefchaouen. Uphill hike. Small store at the top for non alcoholic drinks