Part of Rupert Murdoch's News Corporation empire employed computer hacking to undermine the business of its chief TV rival in Britain, according to evidence due to be broadcast by BBC1's Panorama programme on Monday .

The allegations stem from apparently incriminating emails the programme-makers have obtained, and on-screen descriptions for the first time from two of the people said to be involved, a German hacker and the operator of a pirate website secretly controlled by a Murdoch company.

The witnesses allege a software company NDS, owned by News Corp, cracked the smart card codes of rival company ONdigital. ONdigital, owned by the ITV companies Granada and Carlton, eventually went under amid a welter of counterfeiting by pirates, leaving the immensely lucrative pay-TV field clear for Sky.

The allegations, if proved, cast further doubt on whether News Corp meets the "fit and proper" test required to run a broadcaster in Britain. It emerged earlier this month that broadcasting regulator Ofcom has set up a unit called Project Apple to establish whether BSkyB, 39.1% owned by News Corp, meets the test.

Panorama's emails appear to state that ONdigital's secret codes were first cracked by NDS, and then subsequently publicised by the pirate website, called The House of Ill Compute – THOIC for short. According to the programme, the codes were passed to NDS's head of UK security, Ray Adams, a former police officer. NDS made smart cards for Sky. NDS was jointly funded by Sky, which says it never ran NDS.

Lee Gibling, operator of THOIC, says that behind the scenes, he was being paid up to £60,000 a year by Adams, and NDS handed over thousands more to supply him with computer equipment.

He says Adams sent him the ONdigital codes so that other pirates could use them to manufacture thousands of counterfeit smart cards, giving viewers illicit free access to ONdigital, then Sky's chief business rival.

Gibling says he and another NDS employee later destroyed much of the computer evidence with a sledgehammer. After that NDS continued to send him money, he says, until the end of 2008, when he was given a severance payment of £15,000 with a confidentiality clause attached. An expert hacker, Oliver Koermmerling, who cracked the codes in the first place, says on the programme that he, like Gibling, had been recruited on NDS's behalf by Adams.

The potentially seismic nature of these pay-TV allegations was underlined over the weekend, when News Corp's lawyers, Allen & Overy, sought to derail the programme in advance by sending round denials and legal threats to other media organisations. They said any forthcoming BBC allegations that NDS "has been involved in illegal activities designed to cause the collapse of a business rival" would be false and libellous, and demanded they not be repeated.

On the programme, former Labour minister Tom Watson, who has been prominent in pursuit of Murdoch over the separate News of the World phone-hacking scandals, predicts that Ofcom could not conceivably regard the Murdochs as "fit and proper" to take full control of Sky, if the allegations were correct.

James Murdoch, who is deputy chief operating officer of News Corp and chairman of BSkyB, was a non-executive director of NDS when ONdigital was hacked. There is no evidence, the BBC says, that he knew about the events alleged by Panorama.

Gibling told the programme: "There was a meeting that took place in a hotel and Mr Adams, myself and other NDS representatives were there … and it became very clear there was a hack going on."

He claimed: "They delivered the actual software to be able to do this, with prior instructions that it should go to the widest possible community … software [intended] to be able to activate ONdigital cards. So giving a full channel line-up without payment."

Gibling says that when fellow pirates found out in 2002 that he was being secretly funded by NDS, THOIC was hastily closed down and he was told by Adams's security unit to make himself scarce.

"We sledgehammered all the hard drives." He says he was told to go into hiding abroad.

Kommerling says he was recruited by Adams in 1996. "He looked at me and said 'Could you imagine working for us?'"

Kommerling was told the NDS marketing department were "looking into the competitors' products" and he cracked the codes for the system used by ONdigital, which came from the French broadcaster Canal Plus.

Later he recognised the codes cracked by his own NDS team, when they got out on to the internet. They appeared on a Canadian pirate site with an identical timestamp: "The timestamp was like a fingerprint," he says.

NDS published its own response to the programme's allegations before transmission, saying: "It is simply not true that NDS used the THOIC website to sabotage the commercial interests of ONdigital/ITV digital or indeed any rival."

NDS admits Gibling was in its pay, but says it was using THOIC as a legitimate undercover device. "NDS paid Lee Gibling for his expertise so information from THOIC could be used to trap and catch hackers and pirates," NDS said.

The company does not dispute the allegations that it got its own hands on ONdigital's secret codes, which was not itself illegal, and that the material was passed on to Adams, its security chief. But NDS says there is an innocent explanation "as part of the fight against pay-TV piracy".

According to NDS: "All companies in the conditional access industry … come to possess codes that could enable hackers to access services for free." This is for the purpose of "research and analysis". They claim that it was part of Adams' job to "liaise with other pay-TV providers" and therefore "it was right and proper for Mr Adams to have knowledge of … codes that could be used by hackers".

The company added: "NDS has never authorised or condoned the posting of any code belonging to any competitor on any website." Adams has denied he ever had the codes.

In 2002 Canal Plus, which supplied ONdigital with its smart card system, sued NDS in a US Court, alleging that NDS had hacked its codes. But no evidence about a link to ONdigital emerged: the case was dropped following a business deal under which Murdoch agreed to purchase some of Canal Plus's assets.

ONdigital briefly became ITV Digital before it went under.