Lord Coe might have won the presidency of athletics' world governing body with the help of one of the men at heart of the sport's doping scandal, a BBC investigation has claimed.

BBC's Panorama programme says it has seen text messages that suggest Papa Massata Diack helped secure votes for Coe in the International Association of Athletics Federations (IAAF) election in August 2015.

Diack is the son of former IAAF president Lamine Diack. Both men have been banned for life from the sport and are currently under investigation by French prosecutors on corruption charges.

The Panorama programme, 'Sebastian Coe and The Corruption Scandal', also claims Coe may have misled parliament in November 2015 over what he knew, and when, about the extent of Russia's doping problems.

Coe, who won 1500m gold at the 1980 and 1984 Olympics, denies any wrongdoing and was supported in a statement issued by the IAAF which said the BBC's allegations were based on "flawed assumptions".

The 59-year-old Englishman won the IAAF vote by beating Ukrainian pole vault great Sergey Bubka by 115-92 votes in fiercely contested presidential race, a first for the Monaco-based federation.

After his victory, Coe described Lamine Diack, who already been the subject of an International Olympic Committee ethics inquiry, as his "spiritual president" and thanked him for his "perfect apprenticeship".

According to the BBC, Papa Massata Diack's network of contacts, particularly in Africa, proved to be the difference for Coe in the IAAF campaign.

The programme, which will be broadcast on Thursday night on BBC, will reveal a series of text messages between Papa Massata Diack, Coe and Coe's right-hand man at the IAAF, Nick Davies.

They suggest Papa Massata Diack advised Coe on what to say during the campaign, told him to avoid talking about the doping allegations swirling around the IAAF but to praise Lamine Diack, and gave him inside information on Bubka's strategy.

But at that time Papa Massata Diack was under a cloud of suspicion over his involvement in the IAAF's greatest crisis.

The Senegalese businessman had held an informal marketing position within his father's organisation for years but that came to an end in December 2014, when a German television documentary broadcast allegations that doping was endemic in Russian athletics and the IAAF was helping to cover it up for money.

After stepping down, Papa Massata Diack, and two other close associates of his father, were called in for questioning by French prosecutors.

By this stage, the World Anti-Doping Agency had also started its probe into the claims - an investigation which resulted in the Russian athletics federation and anti-doping agency being suspended in November 2015, and the Diacks receiving life bans.

Coe's IAAF presidential victory came in the middle of these events - but the BBC and Daily Mail say they have seen an email Coe received in early 2014, before the election, that clearly detailed Papa Massata Diack's involvement.

Coe, a former Conservative MP who went on to chair London 2012's organising committee, has been beset by controversy ever since his IAAF victory.

In a testy exchange with the Culture, Media and Sport Committee last year, Coe repeatedly denied that he knew anything of substance about Russia's doping problems or a cover-up, although he had been an IAAF board member since 2003 and a vice-president since 2007.

Committee member Damian Collins told the BBC that Coe's answers were "deliberately misleading".

The IAAF has issued a strong denial on Coe's behalf, attacking Panorama's "flawed assumptions".

The federation said Coe was right to pass on to the ethics commission information he received in 2014 about allegations of a plot to blackmail a Russian athlete over blood results.

It said the panel told Coe it was already aware of the allegations which were being "actively investigated", so left the case with them.

"Seb has never denied hearing rumours about corruption," the IAAF statement continued.

"In fact he has said on many occasions that when alerted to rumours he asked people to pass them on to the ethics commission to be investigated."

In regard to his failure to read the attachments to an email he was sent by former British athlete and London Marathon director Dave Bedford, the IAAF said: "You may think this shows a lack of curiosity.

"He, and we, would argue that it shows a full duty of care: ensuring the right people in the right place were aware of allegations and were investigating them."

The IAAF dismissed the allegation that Coe sought the help of Papa Massata Diack for campaign advice.

"As with any campaign lots of people offer advice - wanted or not, some helpful, some not," it said.

"You try to be civil but wary. This was the case with Mr Diack.

"He sent messages of support whilst at the same time supporting other candidates and accusing Seb Coe of leading a British media campaign against both him and his father."

It concludes by saying it has not seen the BBC's "electronic evidence".

These most recent claims come on the eve of the biggest test of Coe's presidency, the decision on whether to lift the ban on Russia's athletics federation so it can compete at the Rio Olympics.

Russian athletes and officials have been trying to persuade the world that they have cleaned up their act this year, and they have certainly had a clear-out in terms of personnel.

But a recent World Anti-Doping Agency report revealed that despite promises to educate youngsters about clean sport, give life bans to drug cheats and make doping a criminal offence, very little appeared to have changed on the ground in terms of testing.

Coe is under enormous political pressure from the IOC to let the sporting superpower back in.

That decision will be revealed in Vienna on Friday afternoon.