When Roger Ailes resigned from Fox News in July 2016 amid allegations of sexual harassment, he left behind a TV network in turmoil at the height of the US presidential election. But there was no greater validation of Fox’s influence, under Ailes’ tutelage, than the victory of Donald Trump that November.

Ailes, who died on Thursday at the age of 77, became an elusive figure in his final months, roiled by his forced departure from Fox after he was accused of sexually harassing female employees. But his dominance over the political landscape has loomed large throughout Trump’s presidency so far, distinctive in its all-out war against the “mainstream media” and the prominence given to ideologues from the far right.

And Trump’s improbable journey from Manhattan mogul to the Oval Office, media observers say, was made uniquely possibly by the network Ailes transformed over two decades into America’s most-watched cable news channel.

“It’s hard to really overestimate the influence he had on the media and the political landscape,” said Betsy West, a professor at Columbia University’s Graduate School of Journalism, who was formerly the senior vice-president at CBS News and an executive producer at ABC News.

“In many ways, it’s a straight line to our very polarized news landscape today, where people on either ends of the political spectrum can’t agree on basic facts.”

The resulting conditions laid the groundwork for Trump, who, much like Ailes, challenged the institutions and establishment that had long ruled over Washington.

It was no accident that Trump was handed a microphone by Ailes, who boosted his candidacy by allowing him to phone in weekly to the morning program Fox & Friends. Once Trump secured the Republican nomination, his most frequent appearances were made within the comfort zone of the shows of Bill O’Reilly and Sean Hannity – the latter an ardent supporter of Trump and arguably the most bombastic purveyor of Ailes’ own scorched-earth political mentality.

For Trump, a former reality television star, to find a home on the very network that transformed political news into entertainment was almost an inevitability. It also marked the culmination of Ailes’ double act in politics and the media.

“Roger Ailes was first and foremost a political consultant,” said Kerwin Swint, a professor of politics at Kennesaw State University and author of the book Dark Genius: The Influential Career of Legendary Political Operative and Fox News Founder Roger Ailes.

He had been credited with reshaping the image of Richard Nixon through television to help stage his unlikely 1968 comeback, and went on to advise Ronald Reagan and George HW Bush. And then came the idea of a network to fill what he, and, as it would turn out, millions of Americans, saw as a conservative void on cable news.

“He brought to Fox News this real politically oriented, take-no-prisoners mentality to news programming,” said Swing, noting Fox was the first TV network with a clear ideological bent.

“He and Rupert Murdoch believed there was a whole lot of American conservatives out there who didn’t really watch the news, because they thought it was liberal and they wanted something else … It was an untapped market.”

Roger Ailes in the studio. ‘It’s hard to really underestimate the influence he had on the media and the political landscape.’ Photograph: Jim Cooper/ASSOCIATED PRESS

This upending of the rules of traditional media seemed to presage or play its part in the increasingly bitter polarization of the American electorate. Ailes infused his network with talk-radio personalities such as Sean Hannity and Glenn Beck, using their voices to coalesce the conservative movement behind an us-against-them approach.

“He was unafraid of showcasing voices on the right,” said West. “He hired political commentators who were openly disdainful of the mainstream media.”

The genius, West noted, was in Ailes’ balancing act. Traditional anchors such as Shep Smith, Chris Wallace and Bret Baier enabled Fox to maintain credibility as a news organization.

What followed was a blurring of the lines between news and conservative opinion, which to the network’s detractors was a distinction without a difference.

“Fox News often operates as either the research arm or the communications arm of the Republican party,” Anita Dunn, Barack Obama’s communications director, said in 2009. The bitter dispute led to a treasury department attempt to exclude Fox from a round of interviews.

It was arguably during the Obama years that the network took its sharpest turn to the right, often fixating its coverage on what it dubbed the president’s war on American values and fanning the flames of conspiracy theories that included Obama’s birthplace.

The leader of the birther movement was none other than Trump, who propagated the false claim that Obama was born in Kenya to launch his political career in the lead-up to the 2012 election. Despite his public flirtation with a presidential run five years ago, Trump ultimately demurred until his infamous ride down the escalator at Trump Tower in July of 2015.

Before formally launching his candidacy for the 2016 presidential election, Trump met with Ailes over lunch, according to the Ailes biographer Gabriel Sherman.

More than anyone of his generation, he helped transform politics into mass entertainment

Gabriel Sherman, Ailes biographer

In his book The Loudest Voice in the Room, published before Trump’s unexpected victory in the November election, Sherman characterized Ailes’ success at Fox in a line that could just as summarily be ascribed to Trump. “More than anyone of his generation, he helped transform politics into mass entertainment,” Sherman wrote of Ailes, “monetizing the politics while making entertainment a potent organizing force.”

By the time Trump came along, the stage was set for his incendiary rhetoric to be dismissed as in keeping with his brash persona and “tell it like it is” attitude. His mockery of a disabled reporter, a historically low moment for anyone seeking public office, was explained away by supporters as merely a joke and by true believers as the product of selective editing.

On the issues, too, Trump’s focus on immigrants and crime mirrored what had often been primetime fodder for Hannity and O’Reilly. Ailes himself possessed hardline views on immigration, with many suggesting his fingerprints could be seen on Trump’s vows to build a wall along the US-Mexico border and launch a deportation force to throw out millions of undocumented immigrants.

“There’s no question there’s tremendous carryover from the Fox News audience base to supporters of Donald Trump,” said Swing. “Trump was able to tap into that eager Fox News consumer that really bought into a lot of the things he said in the campaign.”

There were perhaps few parallels, however, as potent as the two men’s treatment of women.

More than a dozen women accused Trump of sexual harassment in the final weeks leading up to the election, after the 2005 Access Hollywood tape was unearthed in which he bragged about groping and kissing women without their consent. Ailes’ position at his own network became untenable after he was accused by at least 25 women of sexual harassment, including by the Fox News anchors Gretchen Carlson and Megyn Kelly. Both men denied the claims.

Roger Ailes obituary

Read more

The rumors of Ailes’ abuse had long circulated, but it was not until a New York Times investigation published last year that the flood of women came forward. The allegations fit into the puzzle of Fox’s objectification of women on air, including its use of a camera to zoom in on their legs.

Trump’s misogynistic comments about women had similarly percolated for years, but were viewed in a new light following the tape.

He nonetheless went on to be elected president – due in part to a network that had spent decades attempting to reshape America in its own image.