MONTEVIDEO, Uruguay — The rules are a bit of a buzzkill. Drug users must officially register with the government. Machines will scan buyers’ fingerprints at every purchase, and there are strict quotas to prevent overindulgence.

But when Uruguay’s marijuana legalization law takes full effect on Wednesday, getting high will take a simple visit to the pharmacy.

As American states legalize marijuana and governments in the hemisphere rethink the fight against drugs, Uruguay is taking a significant step further: It is the first nation in the world to fully legalize the production and sale of marijuana for recreational use.

“The great responsibility we have in Uruguay is to show the world that this system of freedom with regulation works better than prohibition,” said Eduardo Blasina, the founder of the Montevideo Cannabis Museum.