- Video report by ITV News Political Reporter Shehab Khan
Sir Keir and Ms Rayner won with 56.2% and 52.6% of the vote respectively.
In his victory speech, which all hopefuls had to pre-record due to coronavirus, he said it was an "honour and the privilege" of his life.
He thanked his opponents for putting up a good fight but said now was the time to bring the party together.
“I want to thank Rebecca and Lisa for running such passionate and powerful campaigns and for their friendship and support along the way," he said.
“I want to thank our Labour Party staff who worked really hard and my own amazing campaign team, full of positivity, with that unifying spirit.
“And to all of our members, supporters and affiliates I say this: whether you voted for me or not I will represent you, I will listen to you and I will bring our party together."
Prime Minister Boris Johnson said he spoke to Sir Keir and after his election win and congratulated him.
He tweeted: "I have just spoken to Keir Starmer & congratulated him on becoming Labour leader.
"We agreed on the importance of all party leaders continuing to work constructively together through this national emergency. I have invited him and other opposition leaders to a briefing next week."
And former Labour leader Jeremy Corbyn said he looks forward to working with Sir Keir Starmer and Angela Rayner as he congratulated his successor.
He tweeted: “Congratulations @Keir_Starmer and @AngelaRayner. “Being Labour Party leader is a great honour and responsibility.
“I look forward to working with Keir and Angela to elect the next Labour government and transform our country."
Sir Keir's message was echoed by the party's new deputy, Ms Rayner, who said it was now time to "rebuild and reconnect".
“Things have dramatically changed in our country in recent months but our values remain the same, and more important than ever.
“Those are the values we will reflect in our actions as an opposition and a movement – standing up for our public services, for our workers and carers, and for a society in which people work together and look after one another.
“Together, we must rebuild and reconnect with communities right across Britain who need our support now, more than ever before."
Former shadow Brexit secretary Sir Keir had been vying for the top job alongside Wigan MP Lisa Nandy and shadow business secretary Rebecca Long-Bailey, who both made it to the final round of voting.
But during the three month contest he also had to see off competition from Emily Thornberry, Jess Phillips and Clive Lewis, all who either dropped out or were eliminated.
One of the competition's outsiders, Ms Nandy, was quick to offer her "support" and "congratulations" to the new leader.
In a message posted to Twitter she added: "We have been competitors in this competition but never opponents and he will have mu full support in the challenges that lie ahead."
Ms Long-Bailey, who was viewed as Jeremy Corbyn's continuity candidate and was the preferred choice of the left, consoled her supporters as they "didn't get the result we wanted".
She said she was "proud" of her campaign as she paid tribute to the news leader.
On Facebook, she wrote: "Keir Starmer will be a brilliant prime minister and I can't wait to see him in Number 10.
"I will do all I can to make that a reality, and to ensure the Labour party gets into government with a transformative agenda at the next election."
The final field of candidates for deputy was much larger, with all hopefuls making it past the initial rounds.
Richard Burgon, Dawn Butler, Rosena Allin-Khan and Ian Murray had all hoped to replace former deputy Tom Watson but failed to win enough support.
Mr Burgon congratulated the winner and said he was looking forward to "working with you to defend our communities hit hard by a decade of Tory austerity and on getting Labour into No 10".
Another defeated deputy leadership candidate, Rosena Allin-Khan, tweeted: “Huge congratulations to @Keir_Starmer and @AngelaRayner, both are formidable candidates who have my full support going forward. Our party must unite and rebuild.”
Shadow chancellor and a key ally of Mr Corbyn, John McDonnell, congratulated the winners, consoled the losers, and urged them all to "unite now as a movement to achieve our socialist aim".
Former deputy Mr Watson tweeted: “My very best wishes to @Keir_Starmer. He has great integrity. He possesses deep reserves of patience and a first-class mind. Above all these qualities, he has a vision of a fairer more equal society.”
He also congratulated his successor Ms Rayner.
"She’s a fine campaigner", he said, "and natural communicator. Commiserations to all the defeated candidates who all worked very hard to make their case."
The new leader already has an important invite to consider, after Boris Johnson asked for cooperation on coronavirus.
He wrote to opposition party leaders inviting them to a briefing next week and insisting “we have a duty to work together at this moment of national emergency”.
He said: "As party leaders, we have a duty to work together at this moment of national emergency.
"Therefore, I would like to invite all leaders of opposition parties in Parliament to a briefing with myself, the chief medical officer and chief scientific adviser next week."
On his final day as Labour leader, Mr Corbyn posted a lengthy Facebook message, thanking his supporters and apologising for what he could not achieve.
He claims to have left the party in a good position to win the next general election, despite him losing more seats that any other leader since 1935.
He said: "I firmly believe that together we have the ideas, policies, energy and organisation to win a Labour government next time.
"We can build a society based on social justice, equality, and care for our environment. But it will not come about unless we fight for it."
He said he will continue campaigning on the "issues and principles" that have motivated him as leader and his voice "will not be stilled".
In 2015, Mr Corbyn took 59.5% of the vote – 251,417 of the 422,664 votes cast.
Sir Keir took 275,780 of the 490,731 returned votes, Ms Long-Bailey won 135,218 votes (27.6%), while Ms Nandy secured 79,597 (16.2%).
There were 136 spoiled ballot papers.