All eyes were on the coffin as the pallbearers made their way to the hearse. The old lady had been popular, and Balham Mosque was thronging with mourners paying their last respects.

Helping to carry the casket on its final journey was Sadiq Khan, the local Labour MP and now hot favourite to succeed Boris Johnson as Mayor of London, one of the most powerful and influential jobs in the country. With the funeral formalities out of the way, Khan switched effortlessly back into professional politician mode, working his way through the crowd in South London.

One figure whose hand he stopped to shake stood out: convicted terrorist Babar Ahmad, a man who has been blamed for inspiring a generation of extremists, including the gang behind the London bombings of July 7, 2005. The pair exchanged brief pleasantries before Khan moved on.

Troubling stories about Sadiq Khan's dealings with Islamic extremists, including convicted terrorist Yasser al-Siri (right, with hate preacher Abu Qatada), raise concerns over his suitability as London's next mayor

The encounter took place a few months ago, around the time of Khan's nomination as Labour's mayoral candidate. Since then, riding on the crest of Jeremy Corbyn's Leftist takeover of the Labour Party, Khan — the London-born son of Pakistani immigrants — has left Conservative mayoral candidate Zac Goldsmith trailing in his wake.

However, in recent weeks, a catalogue of troubling stories about his dealings with Islamic extremists have raised serious questions about his suitability for such a job.

New revelations this weekend — about how Khan shared a platform with Yasser al-Siri, a convicted terrorist and associate of hate preacher Abu Qatada, and Sajeel Shahid, a militant who helped to train the ringleader of the London bombings — are the most serious so far.

And as his fleeting meeting with Babar Ahmad at the funeral shows, Sadiq Khan's interactions with controversial characters are not — as his spin doctors suggest — all in the past. Furthermore, it transpires that the MP for Tooting is a divisive character in his South London community, with dark allegations of threats and betrayal in his own political backyard.

Until his surprise triumph over Labour's popular former Culture Secretary Dame Tessa Jowell for the mayoral nomination, Khan was a little-known figure outside Westminster. The son of a bus driver and a seamstress who, as he has put it, 'worked all the hours God sent', he never quite made it to the political premier league during Labour's years in power. Few colleagues considered him a potential star.

After giving up his job as a human rights lawyer to become an MP in 2005, he had a series of ministerial roles, but never reached the Cabinet. As a result, he was spared intense media scrutiny.

A few months ago, around the time of his nomination as Labour's mayoral candidate, Khan (pictured) was seen talking to another convicted terrorist, Babar Ahmad

Now he is in the full glare of the spotlight — and it has not always been flattering. Earlier this month, it emerged that his parliamentary assistant posted a series of highly offensive homophobic and misogynistic messages online.

Shueb Salar also posed for photos with guns. Amid embarrassment, Khan accepted his resignation.

The episode was a setback for the smooth-talking and ferociously ambitious Khan. It came hot on the heels of toxic revelations that he 'followed' two Isis supporters on Twitter. One posted links to propaganda videos; the other is the brother of a man convicted of supporting insurgents in Afghanistan.

Khan — who follows more than 7,300 people on Twitter — protested that it was 'a bit desperate' to single out two. His problem is that it reinforced the impression he is at best careless about the type of people who surround him; at worst, condones reprehensible views and behaviour.

Khan's troubling connections start very close to home — with his former brother-in-law, Makbool Javaid, who had links with the extremist group Al-Muhajiroun, an organisation that praised the 9/11 attacks and the 7/7 bombings.

In the Nineties, when he was married to Khan's sister Farhat, Javaid appeared at London events alongside some of the country's most notorious hate preachers, including the now banned cleric Omar Bakri.

In 1998, his name appeared on a 'fatwa' — an Islamic legal pronouncement — calling for a 'full-scale war of jihad' against Britain and America, though he later said he never authorised his name being included, and condemns its contents.

In video footage from a rally in Trafalgar Square in 1997, Javaid rants about 'kufr' — a derogatory term for non-Muslims — berates the West, and calls for the re-establishment of an Islamic state.

Ahmad points out that his fight against extradition was supported by a plethora of high-profile politicians, including Zac Goldsmith (pictured) and Boris Johnson

Javaid, who now says he regrets that speech, was divorced from Khan's sister in 2011. Unsurprisingly, the MP has washed his hands of his former brother-in-law, saying they have had 'no contact for more than a decade'.

'I have always condemned the hideous organisations that promote extremism,' he has said. Yet this is just one piece of the mosaic. Both before and after he became an MP, he knowingly shared speaking platforms with some highly questionable figures, including attending at least four meetings organised by Stop Political Terror, a group supported by a man dubbed the 'Bin Laden of the internet'.

Anwar al-Awlaki, an imam linked to Al Qaeda, preached to three of the 9/11 hijackers and became the first American to be targeted and killed in a U.S. drone strike.

Stop Political Terror later merged with Cage, a London campaign group that described Jihadi John (who left the capital to join Isis in Syria) as 'a beautiful young man'. It supports what it calls 'victims' of the war on terror, urging people 'arrested, raided or approached by the security services' to get in touch.

Khan has now distanced himself from Stop Political Terror and Cage. But in 2008 he took part in a controversial conference called the Global Peace and Unity (GPU) Festival, organised by a satellite TV station called the Islam Channel. It has since emerged that he did so against the express wishes of Labour's then Communities Secretary Hazel Blears.

A former aide to Blears said: 'We were deeply unhappy about anyone speaking at the GPU. Most of it is mainstream — but at the fringes are stalls and individuals we deemed beyond the pale. We said to him, 'Don't give it legitimacy by turning up', but he did.'

Until his surprise triumph over Labour's popular former Culture Secretary Dame Tessa Jowell (pictured) for the mayoral nomination, Khan was a little-known figure outside Westminster

For his part Khan said he was there 'as a Government minister with civil servants'.

It has emerged that in 2007, both Khan and Jeremy Corbyn were present at a tenth anniversary celebration of the Palestinian Return Centre (PRC), which is outlawed by the Israeli government.

Israel says the PRC is affiliated to Hamas and has been involved in 'initiating and organising radical and violent activity against Israel in Europe'. The year before the event Khan attended at the Novotel Hotel in Euston, the PRC hosted a conference in Sweden with a Hamas minister, Atef Adwan.

The PRC insists claims of links with Hamas are 'baseless' and points out that it is recognised as a legitimate organisation by the UN. However, the UK refused to support its application for UN status, while the U.S. voted against it.

Khan is exasperated by the fuss about his apparent willingness to associate — however loosely — with advocates of violence and extremism. He points out that many other politicians have done the same, in the interests of open debate. He is infuriated by suggestions that he might sympathise with extremist views.

He claims to have received death threats from extremists for failing to support their cause. Yet his career as a human rights lawyer means he has defended characters he has described as 'frankly speaking, not very nice people, unsavoury'.

Certainly, his background growing up on a South London council estate might help him relate to the underdog. One of eight children crammed into a three-bedroom home, he attended a local comprehensive where he studied biology, chemistry and maths at A-level.

Small but streetwise, as a teenager he took up boxing for self-defence. He slept in a bunk-bed with siblings until he was 24.

After school, he trained as a solicitor with distinguished human rights lawyer Louise Christian. Within three years, he was made a partner, and the company was renamed Christian Khan, but the pair later fell out.

There appears to have been bad blood over financial arrangements for his departure, and Christian felt let down by his stance on legal aid cuts. In the run-up to the election last year, she wrote him an excoriating open letter, saying she was 'deeply disappointed' by his failure to take a stand on the issue. 'When you left in 2004 to [run for] Parliament, you said you felt you could have more of a role in effecting change as a politician than as a lawyer and this was a position I respected. I expected to see you do great things . . .' she wrote.

Today, she is considerably less vocal, saying only that she will vote for him in the mayoral election.

Among those Khan represented as a lawyer was corrupt police officer Ali Dizaei, jailed for attempting to pervert the course of justice and misconduct in public office; and Louis Farrakhan, the notorious U.S. leader of the religious group Nation Of Islam. Farrakhan has labelled white people 'devils,' described Jews as 'bloodsuckers' and called Hitler a 'very great man'.

Khan represented Farrakhan in his attempts to overturn a ban on coming to Britain in the early 2000s. He says: 'Even the worst people deserve a legal defence.'

His dealings with Babar Ahmad form a more complicated tale. On the face of it, Ahmad is yet another unsavoury character, blamed for setting up a website which inspired a generation of extremists. After becoming an MP, Khan supported his battle against extradition to the U.S. (where parts of the website were hosted), presenting a petition of 18,000 signatures to the then Home Secretary, Charles Clarke.

In recent weeks, Khan's critics have attacked him for supporting an individual who, by his own admission, attempted to raise money for the Taliban government at a time, before 9/11, when they were refusing to hand over Osama bin Laden to the U.S.

But while Ahmad, a British Muslim of Pakistani descent, ended up in solitary confinement in a jail in the U.S., his case was highly complex and quite different to some of the violent terrorists with whom he has been compared.

In an unprecedented ruling, the judge at his U.S. trial described him as a 'good person' who posed no risk to the public. His family has always been popular and highly respected in Tooting.

The son of a civil servant and part-time teacher, he went to private school and has strong support within the community.

Now out of jail and back in London, Ahmad says he doesn't know Khan well. Though their paths have crossed in Tooting since they were boys, they have never been friends. He laughs at suggestions that the mayoral candidate is a terrorist sympathiser. 'I have people coming up to me, saying, if Sadiq's a terrorist sympathiser, what hope is there for the rest of us?' he said. 'He's incredibly moderate. He got involved in my case because he is a local politician, and there was a huge amount of support for me in the area. It was not because he knew me.'

Ahmad points out that his fight against extradition was supported by a plethora of high-profile politicians, including Zac Goldsmith and Boris Johnson.

Ironically, elements of the Muslim community in Tooting regard Khan as a sell-out. There is particular anger over his support for gay marriage, for which he voted, despite — it is claimed — leading some constituents to believe he was opposed.

There are reports of a bitter fall-out with a local imam over the issue, after which Khan apparently stopped attending that mosque.

Among prayer-goers at Tooting Islamic Centre recently, there were mixed views. Affan Asjad, 43, a business manager, said: 'Being a Muslim, I wasn't happy about the lesbian and gay marriage vote. He had three options: No, yes or stay neutral — and he voted in favour. Most of the Muslim community are not happy with that.

'He is representing us not only as an MP but also as a Muslim — this is a Muslim area.' Asked whether he would vote for Khan in May, Mr Asjad replied: 'It has put a question mark over his name.'

Mohammed Hussain, 50, a taxi-driver, agreed that local Muslims 'felt let down'. However, he described Khan as 'a good guy'.

The picture is muddied further by disturbing allegations of bullying of Khan's political opponents.

One local woman, Sarbani Mazumdar, stopped voting Labour in disgust after being 'threatened' by Khan's aides after a row over the his stance on post office closures.

In 2008, she had a post office in Balham, which Labour wanted to close. She says Khan told the media he was against the closures and would support her. 'But when it came to the parliamentary vote, he voted for it! So my post office was closed. This was a betrayal.'

She spread a letter locally saying as much. 'Not long after, two men walked into my shop. They said that Sadiq was going to sue me. I was really frightened,' she said.

So tribal was Khan's approach to last year's election that, in a breach of political convention, at the final count, he refused to shake the hand of his defeated Tory rival.