Rabat, Morocco – As a ban on the production and use of plastic bags comes into effect across Morocco on Friday, green campaigners say that the country's consumers may need years to fully comply with the new law.

A landmark bill passed by the Moroccan parliament last October banned the production, import, sale and distribution of plastic bags across the country.

The bill, which became law on July 1, is part of a larger environmentally conscious effort across the North African country to go green.

Morocco ranks alongside Costa Rica, Bhutan and Ethiopia as one of the world’s greenest countries, a fact partially due to its ambitious goals to crackdown on carbon emissions.

Recent sustainability measures have turned the country into a green leader among developing nations, and the city of Marrakesh is due to host a global climate change conference in November 2016.

But as the July 1 deadline approached, shops, street sellers and retailers across the country scrambled to stockpile reserves of reusable bags. The change, they say, will not be easy.

READ MORE: Morocco's colonial heritage in higher education

The country’s battle with the plastic bag has been in the works for years. Efforts in 2009 to ban the production and use of black plastic bags, which litter the country’s streets and beaches, were only partially successful, as authorities struggled to curtail informal production of the bags.

Morocco is the second-largest plastic bag consumer after the United States. It uses about three billion plastic bags a year, according to the Moroccan Industry Ministry. That means, on average, that each one of Morocco’s 34 million people uses about 900 bags a year.

A blanket ban on the use of plastic bags will take some getting used to, says Jennie Romer, a New York-based lawyer.

“It's a big cultural shift with that type of broader law,” she said. “As long as the government has the motivation to really enforce that. There is a lot of potential. The government entity that is implementing it has to be completely on board in order to make that really happen in practice.”

While Industry Minister Moulay Hafid Elalamy, the initiator of the bill, did not return requests for comment, he said on his Twitter account that “several alternative solutions” will be made widely available, such as bags made of paper and fabric. He added that “freezer bags were excluded.”

For weeks now, awareness campaigns throughout the country have been warning Moroccans against the use of bags, which take hundreds of years to degrade. Their message is simple: plastic bags are unhealthy and dangerous for the ecosystem in a country that struggles to clean its streets and where fields of rubbish plague the local environment.

“They do it to promote the image of Morocco as an environmentally friendly country, which is partly true, but not completely,” Mamoun Ghallab, a sustainable development consultant, told Al Jazeera during a recent beach clean-up event in Casablanca.

Ghallab said the government hasn’t done much to raise environmental awareness. Some campaigns about littering have been done, he added, but their cartoonish design made them only marketable to children.

“If citizens are not aware of the concerns and the challenges we’re facing, things will go much slower,” Ghallab said. “Everything begins and ends with the citizens.”

But the UN Environmental Performance Review of Morocco, which has analysed the country’s environment protection progress since 2012, reported that Morocco “fails to address environmental challenges, which can gradually become economic and development challenges”.

Moroccan cities only collect 70 percent of solid waste, according to a 2013 study released by the German Society for International Cooperation. And the World Bank has reported that less than 10 percent of collected waste is disposed of in an “environmentally and socially acceptable manner.”

Yassine Zegzouti, 30, president of local advocacy organisation Mawarid, said it is possible for Morocco to totally ban plastic bags, but that changing consumer habits will be the most challenging part.

The government has shown a commitment to putting the ban into practice, he said, not only through TV spots encouraging citizens to change their habits, but also by investing millions of Moroccan dirhams into encouraging the industry to transform their production of the bags.

“The formal sector will need four to five years to comply with the new law,” said Zegzouti.

“But the use of plastic bags is anchored in [consumer] habit,” said Zegzouti. “All actors need to change these habits to not have any damage in the future.”

This story was produced in association with Round Earth Media. Elaina Zachos contributed reporting.