People observe marijuana plants while visiting the "Expo Cannabis" forum in Montevideo, December 5, 2015. REUTERS/Andres Stapff

MONTEVIDEO (Reuters) - Uruguay’s three-year process of legalizing recreational cannabis consumption reached its final stage on Thursday, when the government said it would authorize pharmacies to begin selling the substance as of July.

Sixteen pharmacies have registered with the government of the tiny South American country to be able to sell marijuana for recreational purposes. That number is expected to increase to 30 in the coming months, said Juan Roballo, head of the National Drug Board.

Uruguay became a global pioneer when it legalized the cultivation, distribution and consumption of marijuana in late 2013. But the rollout has been slow, and the authorization for pharmacies to sell cannabis -- initially expected by the end of 2014 -- has been postponed several times.

The government hopes the formalization process will “guarantee the quality and the purity of the product” citizens consume, Roballo said. The cannabis sold in pharmacies will be grown by producers licensed by the state.

“This is not to promote it, but to compete with the informal market,” he added.

Earlier stages of the process had authorized home cultivation of marijuana for personal consumption, and through membership clubs.

The process will be heavily regulated by the government. Pharmacies will have a total of 400 kilograms (882 lb) at their disposal, an amount that could increase depending on demand, Roballo said. They must sell the substance in 5 gram (0.18 oz)containers at $1.30 per gram, though 10-gram containers are expected to be introduced later.

Interested Uruguayans 18 or older must enroll in a government registry, set to open on May 2, and are limited to purchasing 40 grams (1.41 oz) per month and 10 grams (0.35 oz) per week. Foreign tourists will not be able to purchase the drug.