MEXICO CITY — United Nations human rights experts called on Mexico’s government on Wednesday to establish an independent investigation into smartphone surveillance of human rights lawyers, journalists and social activists.

The hacking effort, using advanced spyware whose sale is restricted to governments, has generated a furor in Mexico. The attorney general’s office, one of the agencies that acquired the spyware, known as Pegasus, has opened an investigation.

But the Mexican government recently blocked a proposal for the country’s new anticorruption board to investigate the hacking — an inquiry that would have been more transparent than an ordinary criminal investigation.

By limiting the case to the attorney general’s office, the Mexican government is investigating itself with no outside oversight, the four United Nations experts said in a statement from Geneva.