As Mexico’s president nears the end of his six-year term, his final mission is a sweeping redesign of the judiciary that he says is needed to fight corruption.

But in a potential turning point for Mexico’s democracy, President Andrés Manuel López Obrador is facing a backlash from critics who say the move is a power grab aimed at eroding judicial independence and expanding the sway of his political movement.

The proposed changes would shift the judiciary from an appointment-based system largely grounded in training and qualifications to one where voters elect judges and there are few requirements to run. The move could potentially force more than 5,000 judges from their jobs, from the chief justice of the Supreme Court down to those at local district courts.

The judiciary rift in Mexico is the latest flashpoint in Mr. López Obrador’s tenure during which he has pushed for sweeping change that he argues will enhance governance, but critics warn could imperil the nation’s democracy and rule of law.

Thousands of judges and court workers around the country have gone on strike in protest, and the U.S. ambassador last week called Mr. López Obrador’s push in the final weeks of his six-year term “a major risk to the functioning of Mexico’s democracy,” provoking a diplomatic spat between the two nations over the wisdom of the proposals, and whether the United States should be weighing in at all.