The executive editor of the New York Times has accused Donald Trump of putting his reporters’ lives at risk by subjecting them to personal abuse and describing them as “enemies of the people”.

Dean Baquet, who has led the news outlet during one of the most tumultuous periods in its history, said the US president’s history of verbal attacks on journalists such as the New York Times’s political reporter Maggie Haberman was “appalling” and risked having serious consequences.

“I think his personal attacks on reporters, including Maggie, are pretty awful and pretty unpresidential,” he said. “I think personal attacks on journalists, when he calls them names, I think he puts their lives at risk.

“I think that when he actually calls reporters names, says they’re un-American, says they’re enemies of the people ... that phrase has a deep history. I think when he says that, it is an appalling attack on the press.”

Baquet’s comments in an interview with the Guardian reflect Trump’s lengthy history of abuse towards journalists in general and the New York Times in particular. They echo comments from the newspaper’s publisher, AG Sulzberger, who has also clashed with Trump over his treatment of the media. Last year Sulzberger said he had told Trump in a meeting that “this inflammatory language is contributing to a rise in threats against journalists and will lead to violence”.

The newspaper’s difficult relationship with the president has been among the defining features of Baquet’s editorship. During his tenure the New York Times has also faced criticism from the left for refusing to call Trump racist or sexist, a decision that Baquet defended on the grounds that he was “not in a position to know whether he [makes comments] because he is a racist”.

Baquet said his job was “to cover the world with tremendous curiosity” rather than act as the opposition to the president – despite calls from many readers and some of his own staff to take a more directly critical approach to Trump.

Asked whether Trump was a racist, Baquet said: “I don’t know. I think Donald Trump says racially divisive things. I think that’s a little bit different. I’m not in his head enough to know whether he says them because he wants to stoke his base.”

Baquet, the first black American to have edited the newspaper, said he was reluctant to allow his reporters to ascribe value judgments to the president, despite his string of outbursts. “I will tell you the most powerful writing I’ve ever seen about race, as a black man who grew up in the south, did not use the word ‘racist’. It quoted people saying what they had to say, and described the world they live in. And you made your own judgment. And the judgment was pretty clear. And I think that’s the way to write about Donald Trump and everybody else. It’s just to let them talk.”

Many outlets, including the Guardian, have branded comments by the US president this summer as racist, while the New York Times stuck with ascribing the judgment to members of the Republican party. Baquet, who does not have responsibility for the outlet’s comment section, also said there was “no question Donald Trump has trouble with women” but declined to brand him a sexist.

Speaking at his organisation’s London bureau while on a short trip to Europe, Baquet said he recognised the “Trump-like” qualities of Boris Johnson, and he raised fears for the future of a media industry where major news stories are still broken largely by a handful of traditional news outlets.

Baquet, 63, took over the New York Times in 2014 when the newspaper was struggling financially and journalistically with the transition from a print to a digital-focused product. Under his tenure and that of the chief executive, Mark Thompson, the publication’s subscriber base has risen to almost 5 million, aided by the switch to reading articles on smartphones and the rise of Trump. “He yanked us back to a world where our role was to cover aggressively, and write very powerfully about, powerful people.”

He acknowledged making mistakes in the 2016 election, having failed to grasp the anger in the US that led to the election of Trump, but said he was constantly fighting against pressure to “take a full-bodied side” against the president. “The way I see it is, our job is to cover the world with tremendous curiosity. And with a desire to understand the people who voted for Donald Trump and why they voted for Donald Trump. I think some of our readers want us to dismiss some of those people. I think that’s not empathetic coverage.”

Some of these rows have now affected the newsroom, which has seen an influx of younger reporters from more diverse backgrounds, prompting what Baquet believes is the biggest change in newsrooms since the Vietnam war in the 1960s. “We have a new generation that grew up in a different world that have not only different demands of their news, they want a different relationship with their readers.”

He warned junior staff and readers against pushing to embrace leftwing Democratic candidates such as Elizabeth Warren or Bernie Sanders, saying the outlet would lose its status if it openly sided with particular politicians.

“They probably want a more political New York Times than I’m willing to give them. I hope they will learn over time that a New York Times that plays it straight has much more power and much more longevity.”

Instead, he insisted the organisation’s lengthy investigation into the president’s taxes had more impact, because of the division between reporting and comment. “The way I look at it, that story would not have been believed had it been written by a news organisation that had spent two years advocating against Donald Trump.”

Baquet, who will step down in two years’ time, has also overseen an expansion of the outlet’s European operation, despite some cultural missteps such as when it suggested that the London food scene had until recently consisted of “porridge and boiled mutton”.

He said there were clear similarities between Trump and Brexit, and noted the failure of the media to understand what drove voters towards both. “Every thoughtful person says you shouldn’t, and yet you are. And I think it’s the same thing, the same error. It really is.”

As both old and new media outlets struggle to be profitable, Baquet said it was easy to romanticise traditional print-only newspapers, but many “weren’t that great” and wider choice was a good thing. At the same time, he warned about a failure of journalism on the horizon as outlets close.

“Something’s got to happen in the time between the the inevitable dying off of some of the traditional media and the rise of the new players, and I don’t know what it is yet. Something’s got to happen, because the picture now doesn’t look great.”

He said that with the exception of BuzzFeed there were few online startup news organisations that had had a substantial journalistic impact. “It’s the Guardian, it’s the New York Times, the Washington Post. It’s the papers that were supposed to be the dinosaurs that are breaking the big stories.”