Uruguay will become the first country in the world to legally sell cannabis over the counter in pharmacies.

The South American country had already legalized cultivation, distribution and consumption of marijuana in 2013 but authorization for pharmacies has not been secured until now.

"Cannabis will be dispensed in pharmacies starting in the month of July," President of the National Drug Board Juan Andres Roballo told a press conference Thursday.

Under the law, buyers must sign up for a national registry of marijuana users and cannot exceed the monthly maximum purchase of 40 grams.

The country's National Drugs Council said the price will be $1.30 per gram and the drug is only available to Uruguayan citizens or permanent residents.

It added that vendors can only sell the drug in 5 gram containers, although 10 gram containers are expected to be introduced later.

The Uruguayan government said it has done a deal with 16 drugstore chains to sell the product.

The marijuana will come from state-supervised fields, with the plants grown under the eye of licensed producers.

The government hopes the state-grown pot will "guarantee the quality and the purity of the product" citizens consume, Roballo said.