SAN JUAN, Puerto Rico (AP) — Puerto Rico's governor on Sunday signed an executive order to authorize the use of medical marijuana in the U.S. territory in an unexpected move following a lengthy public debate.

Gov. Alejandro Garcia Padilla said the island's health secretary has three months to issue a report detailing how the executive order will be implemented, the impact it will have and what future steps could be taken. The order went into immediate effect.

"We're taking a significant step in the area of health that is fundamental to our development and quality of life," Garcia said in a statement. "I am sure that many patients will receive appropriate treatment that will offer them new hope."

The order directs the health department to authorize the use of some or all controlled substances or derivatives of the cannabis plant for medical use.

Garcia said the government also will soon outline the specific authorized uses of marijuana and its derivatives for medical purposes. He noted that medical marijuana is used in the U.S. mainland and elsewhere to treat pain associated with migraines and illnesses including epilepsy, multiple sclerosis and AIDS.

Medical marijuana is already legal in 23 U.S. states, and a group of U.S. legislators is seeking to remove federal prohibitions on it. Elsewhere in the Caribbean, Jamaica recently passed a law that partially decriminalized small amounts of pot and paved the way for a lawful medical marijuana sector.

Jaime Perello, president of Puerto Rico's House of Representatives, said he supported Garcia's order.

"It's a step in the right direction," he said. "One of the benefits that patients say they receive the most is pain relief."

Opposition legislator Jenniffer Gonzalez said Garcia's actions leave the law of controlled substances in what she called a "judicial limbo."

Back in 2013, Puerto Rico legislators debated a bill that would allow people to use marijuana for medicinal purposes, but a final vote was never taken.

Amado Martinez, an activist who supports legalizing marijuana for all uses, said in a phone interview that he was very surprised by the governor's actions.

He wondered what type of illnesses would receive authorization for medical marijuana, and whether the medical marijuana will be imported or if people can obtain licenses to grow it on the island.

"There are so many questions. We have to look at all those details," he said.

___

Danica Coto on Twitter: www.twitter.com/danicacoto