Former Labour spin doctor Alastair Campbell has accused Theresa May of threatening the peace process in Northern Ireland by negotiating a "sordid, dangerous and distasteful" deal with the DUP.

Speaking on the BBC's Question Time, he said he was "really, really" worried about the potential deal between the Tories and the Democratic Unionist Party (DUP) after the prime minister failed to get a majority in the election.

Despite many predicting the party would win a majority of as many as 70 seats, Ms May fell eight seats short of a majority with 318 seats.

She has now entered into negotiations with the unionist party, which won 10 seats, to form a "confidence and supply" alliance which would help them pass legislation on a case by case basis.

Mr Campbell accused Ms May of "playing fast and loose, on Brexit, on Margaret Thatcher’s greatest achievement the single market and now Tony Blair and John Major’s greatest achievement which is the peace in Northern Ireland".

He said: "She is putting that at risk with a sordid, dangerous distasteful deal."

There has been no government in Stormont since January when Sinn Fein withdrew from the power sharing agreement agreed in 2007 after current DUP First Minister Arlene Foster refused to resign over a financial scandal.

After assembly elections in March where the nationalist party won its highest ever number of seats they still refused to re-enter a power sharing government with the DUP while Ms Foster remained in her post.

UK Election Day 2017 Show all 38 1 /38 UK Election Day 2017 UK Election Day 2017 Door of Number 10 Downing Street is seen on the morning after Britain's election in London REUTERS UK Election Day 2017 Labour leader Jeremy Corbyn leaves his home in north London after he called on the Prime Minister to resign, saying she should "go and make way for a government that is truly representative of this country" PA UK Election Day 2017 Shadow Chancellor John McDonnell arrives at Labour Headquarters on June 9, 2017 in London, England. After a snap election was called by Prime Minister Theresa May the United Kingdom went to the polls yesterday. The closely fought election has failed to return a clear overall majority winner and a hung parliament has been declared Getty Images UK Election Day 2017 Caroline Lucas, co-leader of Britain's Green Party, speaks after retaining her seat in the general election, in Brighton REUTERS UK Election Day 2017 Patrons watch the results for Britain's election in London REUTERS UK Election Day 2017 Leader of the Liberal democrats Tim Farron celebrates beating Conservative party candidate James Airey (R) following the announcement of the results at the Westmoorland and Lonsdale constituency count at Kendal Leisure Centre on June 9, 2017 in Kendal, United Kingdom. After a snap election was called, the United Kingdom went to the polls yesterday following a closely fought election. The results from across the country are being counted and an overall result is expected in the early hours Getty Images UK Election Day 2017 Paul Nuttal, leader of the United Kingdom Independence Party reacts after failing to win the seat of Boston and Skegness at the counting centre for Britain's general election in Boston REUTERS UK Election Day 2017 First Minister Nicola Sturgeon arrives at the Emirates Arena in Glasgow, as counting is under way for the General Election. PA UK Election Day 2017 Anna McMorrin hugs Jo Stevens MP after winning Cardiff North for Labour at the Sport Wales National Centre on June 9, 2017 in Cardiff, United Kingdom. After a snap election was called, the United Kingdom went to the polls yesterday following a closely fought election. The results from across the country are being counted and an overall result is expected in the early hours Getty Images UK Election Day 2017 Vince Cable wins the Twickenham election for the Liberal Democrats. Richmond and Twickenham election Rex Features UK Election Day 2017 Britain's Labour party leader Jeremy Corbyn rubs his face after arriving for the declaration at his constituency in London AP UK Election Day 2017 Emily Thornberry speaks after holding her Islington South and Finsbury seat at the Sobell Leisure Centre in Islington, north London PA UK Election Day 2017 Britain's Prime Minister Theresa May listens as the declaration at her constituency is made for in the general election in Maidenhead, England, Friday, June 9, 2017. British Prime Minister Theresa May's gamble in calling an early election appeared Friday to have backfired spectacularly, after an exit poll suggested her Conservative Party could lose its majority in Parliament AP UK Election Day 2017 Labour Party candidate Emily Thornberry smiles at a counting centre for BritainâÃÃ´s general election in London REUTERS UK Election Day 2017 A picture shows the Elizabeth Tower, commonly referred to as Big Ben, and the Houses of Parliament in central London on June 8, 2017, on the night of Britain's general election. Prime Minister Theresa May is poised to win Britain's snap election but lose her parliamentary majority, a shock exit poll suggested on June 8, in what would be a major blow for her leadership as Brexit talks loom AFP/Getty Images UK Election Day 2017 DUP candidate for Lagan Valley Jeffrey Donaldson celebrates following his election at the Eikon Exhibition Centre in Lisburn as counting is under way for the General Election PA UK Election Day 2017 Britain's Home Secretary Amber Rudd attends the count for her seat at a counting centre for Britain's general election in Hastings REUTERS UK Election Day 2017 Ballots are counted at a counting centre for BritainâÃÃ´s general election in London Reuters UK Election Day 2017 The London Eye is illuminated in blue, representing the Conservative Party, after the first exit polls announced in Britain's general election AP UK Election Day 2017 Election officials count votes in the Emirates Arena in Glasgow, Scotland EPA UK Election Day 2017 The London Eye is illuminated in red, the color of the Labour Party, after first exit polls of Britain's national election announced in London AP UK Election Day 2017 BBC Television centre is illuminated with the exit poll results for Britain’s general election Eddie Keogh/Reuters UK Election Day 2017 Labour’s Bridget Phillipson (centre) smiles after being announced as the winner of the election for the constituency of Houghton and Sunderland South at a counting centre Reuters UK Election Day 2017 Members of the election staff prepare to count ballots, in Theresa May’s constituency in Maidenhead AP UK Election Day 2017 Ballot papers are checked ahead of the count at the Westmoorland and Lonsdale constituency count at Kendal Leisure Centre Getty UK Election Day 2017 Ballots are counted at a counting centre for Britain’s general election in Kendal Reuters UK Election Day 2017 Theresa May arrives to vote at a polling station in Maidenhead AP UK Election Day 2017 Jeremy Corbyn arrives to cast his ballot at a polling station in north London EPA UK Election Day 2017 Lib Dems leader Tim Farron outside a polling station at Stonecross Manor Hotel in Kendal, Cumbria PA UK Election Day 2017 The leader of the United Kingdom Independence Party (Ukip) Paul Nuttall arrives to vote at a polling station in Congleton Reuters UK Election Day 2017 Scottish National Party leader Nicola Sturgeon with her husband Peter Murrell (left) the CEO of the SNP after casting their votes at a polling station at Broomhouse Community Hall, Glasgow, Scotland EPA UK Election Day 2017 Caroline Lucas, co-leader of Britain’s Green Party, arrives with her husband Richard Savage, to vote in Brighton Reuters UK Election Day 2017 An advertising van showing caricatures of Tim Farron, Theresa May, Jeremy Corbyn and Paul Nuttall with the message who will be looking for a new job as Britain goes to the polls to elect a new government Rex UK Election Day 2017 Performers pose with puppet caricatures of Britain's Prime Minister Theresa May, leader of the Liberal Democrat Party Tim Farron and leader of the Labour Party Jeremy Corbyn, in front of the Palace of Westminster Reuters UK Election Day 2017 Dogs wait for their owner outside a polling station in Penally, Wales Reuters UK Election Day 2017 Police officers speak with a Labour Party activist outside a polling station in London AP UK Election Day 2017 Benedictine nuns from Tyburn Convent leave after voting in Britain's general election at a polling station in St John's Parish Hall, London AP UK Election Day 2017 A polling station sign is seen on a telephone box outside the polling station at Rotherwick Hall, west of London Getty

Under the terms of the power sharing agreement, while the DUP leader is First Minister the Sinn Fein leader must be Deputy First Minister.

Some have criticised Ms May is willing to get into bed with the party which is notorious for its anti-LGBT rights, anti-abortion and anti-women policies as well as its alleged links to unionist terrorists.

The Conservatives, whose full formal name is the Conservative and Unionist party, has had long links with unionist parties in Northern Ireland but its former traditional partner in the region – the more moderate Ulster Unionist Party (UUP) – was wiped out.

Mr Campbell has called into question whether the Government can include the DUP without threatening the delicate power sharing agreement between them and Irish nationalists Sinn Fein which has helped end The Troubles.

The newer DUP became the largest unionist party in Northern Ireland in 2005 and Reverend Ian Paisley, the Protestant evangelical minister who founded the party in 1971, became First Minister in 2007.

Mr Campbell, who worked with Tony Blair and Mo Mowlam to get the Good Friday agreement signed, said: "I really, really have a worry about this. When John Major was weak and he could have done a deal with the DUP he absolutely and steadfastly refused to do so for very good reasons.

"He said 'I do not what to be in hoc that government'....We have a situation in the Northern Ireland right now where there has been a political crisis where the Government is the mediator with the Irish government between the DUP and Sinn Fein.

"How can our government be the mediator when the DUP are going to be part of our government?"