Mexico’s president on Friday defended his decision to disclose a reporter’s telephone number, saying a law that prohibits officials from releasing personal information doesn’t apply to him.

Press freedom groups said the president’s decision to make public the phone number of a New York Times reporter Thursday was an attempt to punish critical reporting, and exposed the reporter to potential danger.

Mexico’s law on Protection of Personal Data states “the government will guarantee individuals’ privacy” and sets out punishments for officials and others for “improperly using, taking, publishing, hiding, altering or destroying, fully or partially, personal data.”