A general view shows a street painted in the tradition blue of the northern Moroccan Rif town of Chefchaouen on June 21, 2017. (AFP/Emily Irving-Swift)
Huddling against a hillside in northern Morocco is a tourist town famed for the striking blue of its buildings, and now the mayor is mixing in another color -- green.
Chefchaouen -- known locally as Chaouen -- wants to become a model for sustainable development at a time when the northwest African kingdom has shone a spotlight onto its commitment to the environment and a greener future.
Take Aziz, a local council employee in his forties. He whizzes silently around town on an electric bicycle doing his job as an inspector of building sites.
"It's a practical and eco-friendly way of getting around!" he says.
"It respects the environment and allows us to get around easily without using polluting modes of transport," Aziz says, wearing a fluorescent safety vest and with a helmet firmly on his head.
Mohamed Sefiani, mayor of the town of some 45,000 residents where visitors come to admire hundreds of hues of blue, says Chefchaouen began to go green more than seven years ago.
"In April 2010, the municipal council took a unanimous decision aimed at transforming Chaouen into an ecologically sustainable town," he says.
Local political commitment to the project is strong, the mayor says, but much still needs to be done.
"Chefchaouen isn't an ecological town yet, but it certainly has the will to become one," says a smiling Sefiani.
"We are in a transition phase. At a Moroccan and African level, we're among the most advanced towns in this respect."
A woman walks in the Medina of the northwestern Moroccan city of Chefchouen, in the northern Rif region, on September 19, 2017. (AFP/Fadel Senna)
A newly inaugurated municipal swimming pool equipped with solar energy is near an "ecology centre" built from recycled containers where the town's green projects, funded mainly by the European Union and backed by several NGOs, are highlighted.
France's GERES -- Group for the Environment, Renewable Energy and Solidarity -- was asked to help transform Chefchaouen.
"It was at the town's request that we came here to support its energy and climatic transition," says the NGO's Virginie Guy, who is coordinating the project.
Among the initiatives is an "info-energy" centre to raise awareness about energy savings, photovoltaic panels at several sites, such as the municipal library, that contribute to electricity production, and an environmentally oriented museum is also nearly complete.
The info-energy centre's Houda Hadji explains the basics of eco-construction, energy efficiency and the benefits of energy-saving lightbulbs, among other green topics.
"There's very strong interest" from visitors to the centre, says the young guide, her hair concealed under an elegant veil.
"This is the first initiative in Morocco working on energy upgrading in buildings, and providing information about savings, targeting both businesses and individuals," she adds.
Chefchaouen is one of 12 southern Mediterranean locations to benefit from a European programme that has granted it around 10 million dirhams ($1 million, 900,000 euros) and declared the town "a model and initiator of change in sustainable energy management".
But not everything is green yet in the little blue town.
"The public dump is not yet up to standard," Mayor Sefiani concedes.
"We're working on a landfill and recovery centre, and I think that by 2021, we will have ironed out all the problems."
A general views shows two minarets amongst houses painted in the traditional blue colour in the northwestern Moroccan city of Chefchaouen, in the Rif mountains, on June 20, 2017. (AFP/Emily Irving-Swift)
With "green" mosques, solar and wind farms, electric buses and a ban on plastic bags, Morocco has been forging ahead with environment-friendly policies over the past few years.
It regularly trumpets its proactive strategy in terms of green energy, instigated by King Mohammed VI.
Late last year, in the southern city of Marrakesh, the country hosted the COP22 international climate conference, and has begun an ambitious plan to develop renewable energy.
In a country devoid of hydrocarbon resources, the aim is to increase the share of renewable energies nationally to 52 percent by 2030 (20 percent solar, 20 percent wind, 12 percent hydro).
A massive flagship project was inaugurated by the king in February last year. The Noor solar power plant is on the edge of the Sahara desert, some 20 kilometres (12 miles) outside Ouarzazate.
Spread over an area equivalent to more than 600 football pitches, the plant's half a million metal mirrors follow the sun as it moves across the sky and store the energy collected from its rays.
Despite pushing its green credentials, Morocco still has many environmental hurdles to clear on its way to cleaner horizons.
A recent World Bank report covered by Moroccan media spoke of "alarming" peaks of atmospheric pollution in the country's major cities.
And a number of eco projects announced to great fanfare during the 2016 COP22 conference remain just that -- announcements.