The pharmacies selling pot were doing a brisk business.

After Uruguay became the first country in the world to fully legalize marijuana sales for recreational use last month, some of the pharmacies struggled to keep up with the demand.

Then came the stern letters from American banks.

The letters immediately sent officials in Uruguay scrambling to make sense of the Patriot Act and other American laws that could doom an essential part of their country’s new marijuana market.

American banks, including Bank of America, said that they would stop doing business with banks in Uruguay that provide services for those state-controlled sales.

Afraid of losing access to the American banking system, Uruguayan banks warned some of the pharmacies over the last couple of weeks that their accounts would be shut down, potentially signaling a broader international impasse as other countries, including Canada, set out to legalize marijuana.