Ed Richards alleged at a party that a media mogul had threatened him. Mr Richards did not identify the person but guests said they believed he was referring to Rupert Murdoch’s son James, pictured

The boss of Britain’s broadcasting regulator was at the centre of an explosive row with media mogul James Murdoch last night.

The dispute erupted after outgoing Ofcom chief executive Ed Richards claimed he had been threatened during his eight years in the £393,000-a-year post.

He alleged that one media mogul had shouted at him in his office: ‘We know who you are, we know who your friends are and we know where you live.’

The comments, made at a leaving party at Ofcom’s London HQ on Monday, drew gasps of astonishment from guests. Mr Richards did not identify the person but guests said they believed he was referring to Rupert Murdoch’s son James.

Ofcom last night confirmed that Mr Richards made the ‘we know where you live’ claim.

A spokesman refused to say if Mr Richards was referring to James Murdoch. However, given several opportunities to deny that it was him, the spokesman declined to comment.

Reports of clashes between the pair have been in wide circulation among senior media and political figures for several years. They were in a long-running power struggle triggered by an attempted £8 billion bid to take full control of BSkyB, where James Murdoch was chairman, by his father Rupert’s News Corp, BSkyB’s parent organisation.

Ofcom opposed the takeover – despite support for James Murdoch from David Cameron and Tory Culture Secretary and friend Jeremy Hunt. But the Murdochs had to abandon the plan as a result of the phone hacking scandal involving the News of the World, part of News International, also owned by News Corp and where James Murdoch was chairman.

Humiliatingly, he was forced to quit as chairman of BSkyB after Mr Richards questioned whether the company was ‘fit and proper’ to broadcast in the UK.

Respected media analyst Claire Enders, who was at the leaving party for Mr Richards, said: ‘Ed talked of the tough challenges he had faced at Ofcom and how difficult it could be keeping some people happy. He said a major media owner had shouted at him in his office and told him, “We know who you are, we know who your friends are and we know where you live.”

‘Everyone was completely shocked. Many of those present knew of shouting matches between Ed and James Murdoch. But it was a brave thing to say in public in front of so many prominent people.’ Ms Enders said that while Mr Richards did not mention James Murdoch by name, she and fellow guests believed they knew the identity of his target.

Shock: Claire Enders (left) was at the leaving party for outgoing Ofcom boss Mr Richards (right), where the claims were made. The respected media analyst said that guests had been left 'shocked' by his comments

‘No, he didn’t name James Murdoch but 99.9 per cent of people in the room had heard of Murdoch’s temper. Ed said we would have to wait for his memoirs to find out who he was referring to.

‘I am a great admirer of the way Ed did his job. He showed great courage at a very difficult time for the media and its proper place in democracy.’

James Murdoch was forced to step down at News International – which owned The Sun, The Times and News of the World – by the phone hacking scandal that brought the Murdoch empire close to ruin.

No, he didn’t name James Murdoch but 99.9 per cent of people in the room had heard of Murdoch’s temper. Ed said we would have to wait for his memoirs to find out who he was referring to. Respected media analyst Claire Enders, who was at the leaving party

Ofcom later ruled that BskyB was ‘fit and proper’ to hold a broadcasting licence. But it issued a damning verdict on James Murdoch, saying his behaviour in the phone hacking scandal was ‘difficult to comprehend and ill-judged and he repeatedly fell short of his duty as chairman’.

Softly-spoken Mr Richards, 49, is a former adviser to Tony Blair and Gordon Brown. He is stepping down as Ofcom boss to avoid a conflict of interest when his partner Delyth Edwards stands as a Labour candidate in next year’s General Election. He applied unsuccessfully to lead the BBC in 2012.

When he announced his resignation as Ofcom boss he said: ‘It is never easy leaving a job that you enjoy greatly but I have always felt that once I had completed eight years as chief executive this would be the right time to move on.’

During his tenure, Ofcom has been accused of being too lenient on broadcasters who upset viewers with lewd or violent programmes.

Last year, campaigners said the regulator was ‘out of touch’ after it failed to take action over a string of controversies.

Mr Richards was praised by Culture Minister Ed Vaizey at the leaving party.

Mr Vaizey told the assembled guests: ‘There have been a few bumps in the road in the Government’s relations with Ofcom but by and large they do a good job.’

A spokesman for James Murdoch declined to comment.

A spokesperson for News Corp said: 'The allegation is false and ridiculous. James Murdoch never said anything of the sort.'