Bernie Sanders has congratulated Jeremy Corbyn after Labour exceeded expectations in the general election and looks to be on course to increase its number of parliamentary seats.

The former Democratic presidential candidate said he had stayed up to watch UK results come in and was “delighted” at what he had seen.

“I am delighted to see Labour do so well”, he told the Washington Post. “All over the world people are rising up against austerity and massive levels of income and wealth inequality. People in the UK, the US and elsewhere want governments that represent all the people, not just the 1 per cent. I congratulate Jeremy Corbyn for running a very positive and effective campaign.”

Bernie Sanders praises 'courageous' Jeremy Corbyn for 'revitalising democracy'

Mr Sanders had spoken warmly of Mr Corbyn during a visit to the UK earlier this month. Answering a question from The Independent following a speech at the Cambridge Union, the senator said: “Corbyn has shown a lot of courage in dealing with some of the economic issues.

“I applaud Jeremy Corbyn for raising those issues because at the end of the day if we are going to create governments that work for all of us, if we’re going to deal with healthcare and create great education systems and protect the environment and combat climate change… we need to have a government of what Abraham Lincoln described as of the people, by the people and for the people, and not a government of billionaires and large, multinational corporations. So I applaud Corbyn for raising those issues.”

Mr Corbyn has defied his critics in leading Labour to what looks set to be its best election result in years. Projections suggest the party is on course to receive 40 per cent of the vote, giving it 265 seats.

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

Speaking earlier in the night, Mr Corbyn said Labour had “changed the face of British politics”. He said: “I want to send my thanks to everyone who voted for our manifesto and its radical vision for a fairer Britain.

“Our team has worked so hard on this campaign – from door knocking to social media – and it’s great we have won so much support across the country. Whatever the final result, our positive campaign has changed politics for the better.”

Mr Corbyn also called on Theresa May to resign.

"The prime minister called this election because she wanted a mandate”, he said after retaining his Islington North seat with an increased majority. “Well the mandate she's got is lost Conservative seats, lost votes, lost support and lost confidence.