President-elect Claudia Sheinbaum will be hard put to attract foreign investment after her predecessor and mentor, President Andres Manuel Lopez Obrador, boasted Friday that his proposed overhaul of the judiciary is indeed aimed at foreign businesses.

The overhaul politicizes the judicial system by providing for the election of judges, including Supreme Court justices, and waters down professional requirements for judicial candidates.

It passed the Chamber of Deputies last week, with Senate approval expected before Sheinbaum replaces Lopez Obrador on 1 October.

The ruling National Regeneration Movement (Spanish abbr: MORENA) is only one vote short of a supermajority in the Senate and is expected to acquire that vote.

Sheinbaum, a US-trained physicist with leftist inclinations, has tried to calm the fears of foreign investors regarding the overhaul.

But Lopez Obrador’s recent statement confirmed their worst fears.

He has railed against the foreign companies “that come to loot, rob and affect the economy of the Mexican people” and criticized the courts for protecting them.

He has a particular ax to grind with foreign—especially Spanish—energy companies, which have modernized electricity production while weakening the hold of the state power company.

As president, Sheinbaum will wield enormous control over levers of government.  But Lopez Obrador is enormously popular and it is doubtful that she will attempt to reverse the anticipated fait accompli of a court overhaul.