In a couple of years, rows of gleaming solar panels are expected to stretch across the desert outside Morocco's southern city of Ouarzazate, part of the country's plans to meet its energy deficit with power from the sun and wind.
Morocco is one of the world's most energy-poor countries, importing around 95 percent of its needs, according to the World Bank. Energy imports accounted for more than a quarter of the country's total imports last year, contributing to a 7.9 percent rise in the trade deficit to a record $23.6 billion.
So if they are successful, the renewable energy plans could be a big boost to the economy. Together, solar and wind energy development schemes should eventually cut Morocco's annual imports of fossil fuels by the equivalent of 2.5 million tonnes of oil, according to state power utility ONEE. Imports jumped 10 percent in 2012 to 19.7 million tonnes equivalent, energy ministry data shows.
Morocco aims eventually to export some of its renewable energy to Europe via undersea cables; success could pave the way for Algeria and Tunisia to do the same.
But there are major obstacles. Operating solar plants in the arid south of Morocco could damage the environment, straining local water resources. Financing some of the renewable energy projects could be a problem, especially as it is unclear whether they will generate power cheaply enough to be exported.
"The idea seems great, but I don't know whether Morocco can attract the billions needed to reach these ambitions. It's too expensive and massive," said Mehdi Lahlou, economist at the National Institute of Statistics and Applied Economics in Rabat.
Morocco hopes that by 2020, 40 percent or more of its electricity generating capacity will be in the form of renewable sources such as solar and wind.
In 2009, the government announced a $9 billion plan to promote solar energy, envisaging five sites across the country that would produce a total of 2,000 megawatts.
The global credit crisis, which slowed Morocco's economy and hurt the state budget, delayed the plan for several years. But the government is now moving ahead with it; last September, the Moroccan Agency for Solar Energy (MASEN) awarded a $1 billion contract to a consortium led by Saudi International Company for Water and Power (ACWA) for an initial project at Ouarzazate.
Under the contract, ACWA will build and operate a 160 MW solar plant, supplying electricity at 1.62 dirhams ($0.19) per kilowatt hour, against 2.05 dirhams offered by the other consortiums which bid.
Now MASEN is soliciting bids for another solar facility at Ouarzazate with a capacity of 300 MW. The deadline to submit expressions of interest is March 25.
Solar power generation requires water for mirror washing, raising concern about the environmental impact. A World Bank assessment in February said the water needs of the first Ouarzazate facility would be small; "this impact is considered to be of minor to moderate negative significance." However, the drain of water due to solar projects is expected to increase as their number grows.
By contrast, wind farms do not appear to face significant environmental concerns in Morocco. ONEE has already installed 250 MW across the country and plans many more facilities. Nareva Holding, the energy arm of investment company SNI, which is controlled by Morocco's royal family, is a major player.
"Costs for wind are competitive now so we don't need an agency like MASEN in the solar sector," ONEE chairman Ali Fassi Fihri told a news conference this month.
Last month, French utility GDF Suez said that in a consortium with Nareva, it would start to build Africa's largest wind farm, with output of 300 MW, in Morocco's southern desert. Investment will total around 540 million euros ($710 million), partly financed by 360 million euros of loans from three Moroccan banks. Fihri told Reuters that ONEE would buy electricity from the farm at 0.64 dirham per kWh over 20 years.
Next month, ONEE plans to invite bids to build five wind farm projects with total capacity of 850 MW. That huge project would require about $1.7 billion of investment, however, and so far only $201.7 million has been secured in the form of a loan signed with the African Development Bank.
Obtaining finance for the renewable energy projects will depend partly on how competitive they appear against other sources of energy - and here the outlook is not entirely sunny.
Although Morocco imports the vast majority of its coal, ONEE plans to build a big coal-fired power plant on the Atlantic coast near the city of Safi, under a contract awarded in 2010 to GDF Suez and Nareva. Mines and energy minister Fouad Douiri told Reuters that the plant was expected to start operating by the start of 2017.
Earlier this month, Abu Dhabi National Energy Co obtained $1.4 billion in financing to expand its coal-fired power plant in Jorf Lasfar, which would bring the plant's capacity to a massive 2,000 MW. ONEE has also launched a tender for a 350 MW coal-fired power plant in the eastern city of Jerada.
Given expected growth in Morocco's population and energy demand over the next decade, there is likely to be room for expansion of both traditional and renewable sources. But while ONEE's Fihri said some Moroccan wind farms now generated power more cheaply than coal-fired plants, it is not clear that all its renewable energy projects will be able to compete on price.
Exporting large amounts of energy to Europe may be impossible for the foreseeable future because of cost factors. The ACWA solar project, for example, plans to supply electricity at the equivalent of about 0.15 euros per kWh - significantly more expensive than some renewable energy projects in Spain, which also has major solar and wind resources.
"Morocco cannot compete with Spanish prices, which are at between 0.05 and 0.06 euros per kWh," Ingrid Christina Barth, a German embassy official handling cooperation with Morocco, told Reuters.
"Any imports of green Moroccan energy into the EU would therefore have to be subsidised - in one way or another."