(CNN) In a landmark ruling, a court in Mexico City has said two people should be allowed to use cocaine legally.

The ruling means the unnamed pair can use, but not sell, small amounts of cocaine, according to Mexico United Against Crime (MUCD), an NGO that filed legal papers in the case as part of its strategy to change the country's drug policy.

This is the first time cocaine use has been made legal in Mexico, but the ruling still needs to be ratified by a higher court.

It comes at a time when Mexico is grappling with its drug policy under President Andrés Manuel López Obrador, whose official development plan for 2019-2024 pledges to reform a "prohibitionist approach" that it calls "unsustainable" due to the "violence and poor public health outcomes" it has generated.

Mexico has been locked in a war on drugs since 2006.

The court ruling orders Mexico's national health regulator, Cofepris, to authorize two people to legally possess, transport and use cocaine.

Read More