MEXICO CITY (AP) — New rules to make Mexican labor union elections more democratic have taken effect, but unions have four years to comply with the measure requiring secret ballots on contracts.

The change is meant to eliminate the longstanding practice in which pro-company “protection” unions sign contracts behind workers’ backs.

Companies often find or form compliant unions and sign contracts before they even open factories in Mexico.

The Labor Department said Thursday that unions will now have to publish public notices about upcoming contract votes and provide prior information to union members.

The new law comes amid pressure on Mexico to tighten its labor rules as part of the U.S.-Mexico-Canada free trade agreement.