This is an archived article and the information in the article may be outdated. Please look at the time stamp on the story to see when it was last updated.

MEXICO CITY (AP) — Mexico’s Senate has approved a wide-ranging reform of laws governing the mining industry, including a requirement that companies pay 5% of profits to local communities.

The mining bill was among 18 pieces of legislation, some controversial, that were passed in a frenzied rush late Friday and early Saturday.

The bills were approved with little or no debate, based on votes by only senators from Andrés Manuel López Obrador’s Morena party and its allies. The opposition occupied the Senate’s normal headquarters to protest a lack of debate, so the Morena senators and allies met in an alternative chamber.

The new mining law reduces the maximum length of concessions from 50 to 30 years, and punishes speculation by allowing authorities to cancel concessions if no work is done on them within two years.

The mining industry, much of it foreign and in a considerable amount Canadian, has drawn complaints because of ecological damage, speculation and the fact that communities around the mines remain among the poorest in Mexico.

Many companies, especially smaller “minor” companies listed on Canadian exchanges, do exploratory work, estimate the presence of minerals and then do nothing, waiting to sell the concession to a larger player. Many of the properties involve gold or silver deposits.

Large Mexican companies dominate mining for copper and some other metals.

The Senate also approved a bill mandating 10 to 15 year prison sentences for people who produce the synthetic opioid fentanyl in Mexico or who provide precursor chemicals largely imported from China. It makes drug production a separate crime, in addition to possession.

Perhaps more controversially, the senators approved a bill to replace the country’s science and technology commission — which hands out research grants and other funding — to include representatives from the Army and Navy on its board.

The new framework would also explicitly give priority to researchers at state-run universities over private ones.

Under another bill, the military would gain a dominant role in providing security in the country’s airspace, and would also be allowed to operate a commercial airline. That represents a potential conflict, since the army will also be allowed to operate civilian airports, and Mexican law prohibits and airport operator from also running an airline.

López Obrador has greatly expanded the military’s role to everything from building projects to operating companies.