MEXICO CITY  Mexican lawmakers on Tuesday stripped a controversial provision from their plan to overhaul the country’s judiciary that would have given police officers, who are widely mistrusted here, the ability to enter homes without obtaining warrants beforehand.

Warrantless searches would have been allowed only in emergencies and in cases of hot pursuit of criminal suspects. But human rights groups had strongly opposed the measure, fearing that a police force notorious for corruption would abuse the authority.

One newspaper labeled the plan the “Gestapo law.”

The last-minute change, approved overwhelmingly by the House of Deputies, delays passage of a revamping of the country’s judicial system that is meant to speed up trials that now stretch on for years and to better equip the country in its battle against narcotics traffickers.

“In this country, no one is satisfied with our justice system,” said César Camacho Quiroz, a legislator representing the opposition Institutional Revolutionary Party, who opposed the expanded police powers.