Boris Johnson led the tributes from the steps of Downing Street, praising Prince Philip's "extraordinary life".
Labour leader Sir Keir Starmer said the UK had "lost an extraordinary public servant", while Scotland's First Minister Nicola Sturgeon sent her condolences to the Royal Family.
Parties have suspended their election campaigning as a mark of respect.
Elections are due to take place for the Scottish and Welsh parliaments, English councils, city mayors and police and crime commissioners on Thursday, 6 May.
Earlier, cabinet ministers met to pay tribute to the duke, who had known 16 prime ministers during his time by the Queen's side.
A statement released after the virtual meeting said they had "shared recollections of meeting Prince Philip and praised his work, including as an environmentalist and for the Duke of Edinburgh's Award".
Parliament will return a day early from recess on Monday so MPs can share their condolences in the Commons - led by the prime minister and Sir Keir.
Peers - who were due to return to the House of Lords on Monday - will also start their proceedings with a humble address of condolence to the Queen.
The Scottish Parliament, the Northern Ireland Assembly and the Welsh Senedd will also be recalled on Monday for tributes.
The Speaker of the House of Commons, Sir Lindsay Hoyle, told the BBC Prince Philip was a "magnificent man" and an "institution".
In a statement, he added: "Today we must pause to honour him and to offer our sincerest thanks for the prince's devout faithfulness to our country - and all the nations shall miss him greatly."
The death of Prince Philip, who was married to the Queen for more than 70 years, was announced by Buckingham Palace on Friday.
The statement said he had "passed away peacefully this morning at Windsor Castle".
The government has issued guidance for all official flags on all UK government buildings, including the union jack, to be flown at half-mast in tribute to the duke until 08:00 BST on the day following his funeral.
Giving a speech outside No 10, Mr Johnson said the duke had "earned the affection of generations here in the United Kingdom, across the Commonwealth and around the world".
The prime minister praised Prince Philip's service and "bravery" in World War Two, as well as his contributions after - from being a "champion of the natural world" through to having "shaped and inspired the lives of countless young people" through the Duke of Edinburgh award.
"We remember the duke for all of this and above all for his steadfast support for Her Majesty the Queen," he added.
"We offer our condolences to her and to all her family and we give thanks, as a nation and a kingdom, for the extraordinary life and work of Prince Philip."
Labour leader Sir Keir Starmer said the Duke of Edinburgh had "dedicated his life to our country", but he would be "remembered most of all for his extraordinary commitment and devotion to the Queen".
In a statement, Sir Keir said it had been "a partnership that inspired millions in Britain and beyond".
He added: "Their marriage has been a symbol of strength, stability and hope, even as the world around them changed - most recently during the pandemic.
"My thoughts are with the Queen, the Royal Family and the British people as our nation comes together to mourn and remember the life of Prince Philip."
Other political leaders also paid their respects to the duke - including the SNP's Nicola Sturgeon, who said she was "saddened by the news".
She added: "I send my personal and deepest condolences - and those of [the Scottish government] and the people of Scotland - to Her Majesty the Queen and her family."
Northern Ireland's First Minister Arlene Foster offered her "deepest sympathies" to the Royal Family, while Deputy First Minister Michelle O'Neill extended her "sincere condolences".
Welsh First Minister Mark Drakeford said Prince Philip had "served the crown with selfless devotion and will be sorely missed by the people of Wales and the many organisations he supported".
The leader of the Liberal Democrats, Sir Ed Davey, said the duke was "a much-loved husband, father, grandfather and great grandfather", adding: "We will always be grateful for his amazing service."
Former leaders also expressed their sadness at the death of the Duke of Edinburgh.
Theresa May, who stood down as prime minister in 2019, said her "thoughts and prayers" were with the Queen and her family.
She told the BBC that Prince Philip had "a dry sense of humour" and was "a man of so many different interests", adding: "I will remember him... as somebody who put those talents to the committed and selfless service of the Queen and her country."
Her predecessor and fellow Conservative, David Cameron, called it "desperately sad news", adding: "It was an honour and a privilege as prime minister to see up close what a powerful advocate the duke was for the causes he believed in."
Former Labour Prime Minister Gordon Brown said he was "personally fortunate to benefit from the duke's wisdom on many occasions", adding that his "commitment to the United Kingdom and to the Commonwealth will never be forgotten".
And his predecessor in No 10, former Labour PM Tony Blair, said Prince Philip was "a man of foresight, determination and courage" who was "often way ahead of his time", on issues such as the environment and "reconciliation between religious faiths".
Former Conservative PM Sir John Major also released a statement, saying: "Modest to the core, and hating any kind of fuss or bother, [Prince Philip] epitomised the British spirit and remained true to himself right up to the very end."