* Labour government will act to fix Britain

* Starmer says change will take time

* Sunak stays on as Conservative leader for a while

LONDON, July 5 (Reuters) - Britain's new prime minister Keir Starmer pledged action to fix the country, not just words, on Friday, but warned the voters who handed him a massive electoral majority and those who voted against, that improvements would take time.

Standing outside his new office and residence at Number 10 Downing Street, Starmer cut a serious figure, acknowledging the scale of the challenges that faced him after his party's landslide victory in a parliamentary election ended 14 years of often tumultuous Conservative government.

He was greeted by huge cheers and in turn took time before making his speech to shake hands with and hug aides and well-wishers who lined Downing Street.

Standing behind a lectern, he said he understood that many Britons were disillusioned with politics after years of scandal and chaos under the Conservatives, who were roundly rejected in Thursday's election, suffering a historical loss.

"This lack of trust can only be healed by actions, not words. I know that," he said.

"Whether you voted Labour or not, in fact, especially if you did not, I say to you directly - My government will serve you. Politics can be a force for good. We will show that."

The centre-left Labour won a massive majority in the 650-seat parliament, prompting Rishi Sunak's resignation on Friday morning. Starmer then went to meet King Charles and was formally named Prime Minister.

"My government will fight every day until you believe again. From now on, you have a government unburdened by doctrine, guided only by the determination to serve your interest," he said, underlining something he had repeated during the campaign - that he would put country first, party second.

"To defy, quietly, those who have written our country off. You have given us a clear mandate, and we will use it to deliver change."

The election result has upended British politics. Labour won some 410 seats, an increase of 210, while the Conservatives, the western world's most successful party, lost about 250 lawmakers, including a record number of senior ministers and former Prime Minister Liz Truss.

Sunak's Conservatives suffered the worst performance in the party's long history as voters punished them for a cost of living crisis, failing public services and a series of scandals.

"To the country I would like to say first and foremost I am sorry," Sunak said in a final speech outside Downing Street, adding he would stay as Conservative leader until the party was ready to appoint his replacement.

"I have given this job my all, but you have sent a clear signal that the government of the United Kingdom must change, and yours is the only judgment that matters. I have heard your anger, your disappointment and I take responsibility for this loss."

TOUGH ROAD AHEAD

Despite Starmer's convincing victory, polls have suggested there is little enthusiasm for Starmer or his party. Thanks to the quirk of Britain's first-past-the-post system and a low turnout, Labour's triumph was achieved with fewer votes than it secured in 2017 and 2019 - the latter its worst result for 84 years.

The pound and British stocks and government bonds rose marginally on Friday, but Starmer comes to power at a time when the country is facing a series of daunting challenges.

Britain's tax burden is set to hit its highest since just after World War Two, net debt is almost equivalent to annual economic output, living standards have fallen, and public services are creaking, especially the much cherished National Health Service which has been dogged by strikes.

Some of Labour's more ambitious plans, such as its flagship green spending pledges, have already been scaled back while Starmer has promised not to raise taxes for "working people".

Likewise, he has promised to scrap the Conservative's controversial policy of sending asylum seekers to Rwanda, but with migration a key electoral issue, he will be under pressure himself to find a way to stop tens of thousands of people arriving across the Channel from France on small boats.

"I don't promise you it will be easy," Starmer said earlier at a victory rally. "Changing a country is not like flicking a switch. It's hard work. Patient, determined, work, and we will have to get moving immediately."

Britain's election result showed growth in support for the right-wing Reform party, led by Nigel Farage, echoing recent similar results in Europe where the far right have been surging.

But, unlike France where Marine Le Pen's National Rally party made historic gains in an election last Sunday, overall the British public has plumped for a centre-left party to bring about change.

Starmer has promised to improve relations with the European Union to resolve issues created by Britain's split from the bloc. However, despite opposing Brexit, rejoining the EU is not on the table.

He may also have to work with Trump if he wins November's presidential election. Trump has already sent congratulations to Farage, via his social media platform Truth Social.

While he has promised to bring change domestically, Starmer has vowed to continue London's unequivocal support for Ukraine in its war against Russia. On many foreign issues, his policies are similar to Sunak's.

The election victory represents an incredible turnaround for Starmer and Labour, which critics and supporters said was facing an existential crisis just three years ago when it appeared to have lost its way after its 2019 drubbing.

A series of Conservative scandals - most notably revelations of parties in Downing Street during COVID lockdowns - undermined then prime minister Boris Johnson and its commanding poll lead evaporated. (Additional reporting by Elizabeth Piper, Andrew MacAskill, Alistair Smout, Sachin Ravikumar, Paul Sandle and Muvija M, Kate Holton, William Schomberg; editing by Philippa Fletcher)