Andrés Manuel López Obrador swept the Mexican left into power with promises of respecting the press and ending the killing of journalists.

But that commitment is now being tested, as the president aims a series of barbs at a Mexico City newspaper providing tough coverage of his actions in power.

López Obrador refuses to live in the presidential palace. Earlier this week, the newspaper Reforma published a story on security being beefed up at his private residence.

The story listed López Obrador’s address. It was in the public domain anyway but the president publicly complained and an onslaught of threats and harassment followed against Reforma’s editor, Juan Pardinas.

Pardinas “was a victim of death threats, harassment and a tentative doxxing via social networks by unknown subjects”, the press freedom organisation Article 19 said in a statement.

Article 19 also asked López Obrador to “abstain from generating any act that inhibits the exercise of freedom of expression … This includes maintaining a stigmatising discourse.”

On Friday, the president offered protection to Pardinas. He said: “Media outlets will be untouchable. I absolutely respect their right to manifest ideas, the right to dissent.”

López Obrador acknowledged differences with the owners of Reforma, but added: “We will always guarantee their right to freely manifest ideas.”

López Obrador, a friend of the British Labour leader, Jeremy Corbyn, won power on an agenda of cleaning up corruption, calming the country as its drug war drags on and pulling people out of poverty.

He also promised transparency. Commonly known as Amlo, he holds a daily 7am news conference, to which tens of thousands tune in.

The events can turn testy. Amlo has accused reporters asking tough questions of not having their facts right, only to have the reporters’ facts and figures prove accurate.

Reporters have been mobbed on social media. Shortly after Univision journalist Jorge Ramos asked an unwelcome question on Mexico’s rising murder rate, the president told reporters: “If you step out of line, you know what will happen. But it won’t be me, it’s the people.”

Journalists have accused the president of making their jobs more difficult, in a country where press freedom groups say more than 100 media workers have been murdered since 2000. Five journalists have been murdered since Amlo took office.

The relationship with Reforma has proved especially testy. In one press conference, he asked Reforma to reveal a source, arguing it was a matter of “transparency”. Amlo refers to the paper – along with civil society groups and others with which he is at odds – as “fifí” (posh) and “conservative”. Observers see similarities with Donald Trump’s tweets decrying “the failing New York Times”.

“Will we someday hear López Obrador say the press that he doesn’t like, or directly Reforma, is ‘the enemy of the people’?” wrote the journalist Carmen Aristegui, whose radio show has been booted off the air in past years over its investigative reports, in Reforma.

“It’s similar to what Trump does with the New York Times,” said Carlos Bravo Regidor, a political analyst.

“Trump has a strong opposition,” Bravo added. But in Mexico, Bravo said, critical press coverage is important because “López Obrador has fewer checks on his power” since he has majorities in congress and the political opposition is moribund.

Other critics say Reforma’s critical coverage of past administrations, which were known to ply media outlets with advertising in exchange for positive stories, helped pave Amlo’s path to power.

“Reforma isn’t doing anything with López Obrador that it didn’t do with other governments” said Javier Garza, former publisher of El Siglo de Torreón.