On a freezing November day in 2010, the education secretary, Michael Gove, turned out in east London to inspect a desolate stretch of dockside ground near City airport, where Rupert Murdoch had offered to build an academy school.

The cabinet minister was accompanied by Rebekah Brooks, then News International chief executive, and an entourage of other top Murdoch staff, including James Harding and Will Lewis.

Despite the unprepossessing venue there was no mistaking the company's enthusiasm for the project. Murdoch described himself in a speech as the saviour of British education, thanks to his company's "adoption of new academies here in London".

It was a high-water mark of the love-in between Gove, Murdoch and the Conservative government. Gove, a former Times journalist, had previously gone out of his way to flatter his own proprietor, writing that Murdoch "encourages … free-thinking".

Shortly after the Docklands visit, the phone-hacking scandal disrupted these close relations. News International's proposed academy was quietly abandoned. Newham council says nothing was subsequently done to fulfil Murdoch's promises.

But Gove returned to his pro-Murdoch theme last week, publicly attacking the Leveson inquiry, set up in the wake of News International's misdeeds, as a threat to press freedom. "Whenever anyone sets up a new newspaper – as Rupert Murdoch has with the Sun on Sunday – they should be applauded and not criticised," he said.

It was a reminder of the extraordinarily close links that still exist between publishing tycoon and Tory politician. One of Murdoch's long-term projects is what he calls a "revolutionary and profitable" move by his media companies into online education. Gove would be a key figure in any attempt to penetrate the British schools market.

The education secretary meets Murdoch frequently and is an enthusiastic backer of the ideas of Joel Klein, the head of Murdoch's new education division. Within a week of his promotion in 2010, the minister was at dinner with Murdoch, according to officially released details of meetings.

The atmosphere could only have been warm. Gove once sang Murdoch's praises in a 1999 Times column as "the greatest godfather of mischief in print" who possesses "18th-century pamphleteering vigour". He wrote that Murdoch "encourages … free thinking. His newspapers … are driven by public demand and the creativity of chaotic, cock-snooking, individuals."

Murdoch in turn was kind to his former employee. When Gove first arrived at Westminster in 2005 as a backbench MP, the Times topped up his salary with a £60,000-a-year column. His wife still works for the paper.

Murdoch's publishing arm, HarperCollins, also gave Gove a book advance in 2004, when he was first selected for the safe Conservative seat of Surrey Heath. It was for a history of an obscure 18th-century politician, Viscount Bolingbroke.

Puzzlingly, the book was never delivered. HarperCollins refuses to disclose the size of the advance and its size is not specified in Gove's register of financial interests. Asked if his advance should be returned eight years later, HarperCollins says Gove "is still committed to writing a book on Bolingbroke but obviously his ministerial duties come first for now". Gove will not comment.

At the Gove dinner on 19 May 2010, Murdoch was accompanied by his then right-hand aide in Britain, Rebekah Brooks. Brooks was also with the education secretary at a second dinner three weeks later, on 10 June, for what his department terms "general discussion".

In a subsequent speech to the National College for School Leadership, Gove singled Joel Klein out for praise. Klein was a US lawyer then running the New York school system. But Klein was also Murdoch's own favourite US educator. His clashes with the teachers' unions and his enthusiasm for academy-style "charter schools" had caught the tycoon's interest. Murdoch planned to hire Klein himself.

Gove told his British audience on 16 June that US reformers such as Klein were insisting on "more great charter schools … free from government bureaucracy" because they were "amazing engines of social mobility".

Within 24 hours of that speech, the minister was once more at the lunch table with Murdoch himself, again with Brooks in attendance and, according to the department, other "News International executives and senior editors", for "general discussion".

At the end of summer 2010, Murdoch formally hired Klein for $2m (£1.3m) a year, plus a $1m signing bonus, to launch what he called a "revolutionary, and profitable, education division". Murdoch bought Wireless Generation, a US educational technology firm, for $360m, and gave it to Klein to run. Murdoch's vision was that he would digitise the world's so far unexploited classrooms. He told investors: "We see a $500bn sector in the US alone that is waiting desperately to be transformed by big breakthroughs." He envisaged some of News Corporation's large library of media content being beamed to pupils' terminals.

Gove seemed to be an enthusiast. He met Klein on 30 September 2010, before the announcement of his link-up with Murdoch. The Department for Education does not explain the circumstances, other than saying "more than 10 others" were present for a "general discussion".

The following month, Murdoch flew to London again, to deliver the Margaret Thatcher lecture at the Centre for Policy Studies. He called for a revolutionised education system in the UK "that really teaches … In the last decades, I'm afraid, most of the English-speaking world has spent more and more on education with worse and worse results".

He boasted: "That is why so many of my company's donations are devoted to the cause of education – including the adoption of new academies here in London. There is no excuse for the way British children are being failed" .

Gove was with Murdoch for the celebratory dinner afterwards, along with Murdoch's son James and all his editors. And in the new year, Klein flew to England along with Murdoch himself for three days spent at Gove's department. He was "visiting UK as guest of DfE to explain and discuss US education policy and success", say officials. Gove was photographed visiting the King Solomon academy with Klein, who addressed a free schools conference. Gove dined with Murdoch, and with Brooks yet again, at a dinner hosted by businessman Charles Dunstone, an academy sponsor.

On 19 May, Gove breakfasted with Murdoch in London. The tycoon flew on from that meeting to address a Paris conference of internet entrepreneurs. This time, he went into some detail about News Corp's plans for educational technology. He and Klein had been touring educational projects around the world, in South Korea, Sweden and California. Schools were the "last holdout from the digital revolution" he said. "Today's classroom looks almost exactly the same as it did in the Victorian age …The key is the software."

"I'd expect in the next [few] months we'd be making some acquisitions," Klein told the Financial Times. "There's the willingness to put in significant capital."

He cited the Khan Academy, a not-for-profit producer of educational videos through YouTube, as an example of how technology could add value.

On 16 June, Gove addressed the teachers' college in Birmingham on strikingly similar lines, calling for "technical innovation" in the classroom. He cited the "amazing revolution" of iTunes U in publishing lessons online. The same night, he dined with Rupert Murdoch yet again.

Four days later, Gove returned to the theme in another speech, praising News Corp's new hiring, Joel Klein, and urging his audience to read an "excellent article" Klein had written promoting charter schools.

Murdoch himself, returning to London, spoke at a conference of chief executives. The Times recorded: "Mr Murdoch detailed a vision whereby almost all children would be provided with technology such as specially designed tablet computers. He said that through such advances, 'You can get the very, very finest teachers in every course, in every subject, at every grade, and make them available to every child in the school – or if necessary, in some cases – in the world.'

"Mr Murdoch said that News Corporation, parent company of the Times, would help to spearhead this change by growing its business in providing educational material. He said he would be "thrilled" if 10% of News Corporation's business was made up of its education revenues in the next five years."

On 26 June, Gove was at yet another dinner with Murdoch. He followed it up with the most explicit endorsement to date of News Corp's education project in an address to the Royal Society entitled Technology in the Classroom. He even held up for praise Klein's favourite model, the Khan Academy, which was "putting high-quality lessons on the web".

He said: "We need to change curricula, tests and teaching to keep up with technology … Whitehall must enable these innovations but not seek to micromanage them. The new environment of teaching schools will be a fertile ecosystem for experimenting and spreading successful ideas rapidly through the system."

Murdoch's education project now began to falter, however, because of the looming British phone-hacking scandal. In the US, voices began to question the links between Klein and contracts awarded by the New York education department to Wireless Generation, the technology firm acquired by Murdoch. Klein and Murdoch's education division lost a hoped-for new $27m contract with the New York authorities.

Klein himself was catapulted into a central role in the company's attempts to firefight the scandal. He flew over to London to the parliamentary committee hearings in July. While all eyes were on Wendi Deng as she landed a punch on the foam-pie thrower who attacked her 80-year-old husband during the televised session, few noticed the dry legal figure sitting just behind her.

He now plays a key role in controlling the controversial management and standards committee (MSC) that is house-cleaning at News International by handing over journalists' incriminating emails to the police.

Until Murdoch's UK operation has been fully cleansed of its hacking toxicity, the way will not be open for Klein to resume his education projects, and his formerly close political links with Gove. But the end of the process of "draining the swamp", as one MSC source put it, may now be in sight.

Invited to respond to these issues, a Gove spokesman declined to comment.