British Prime Minister Teresa Mae has arrived in Buckingham Palace to formally resign to Queen Elizabeth II in preparation for Boris Johnson's appointment.

Theresa Mei had previously gone to Downing Street to give her farewell speech, thanking all those who had supported her during her tenure as prime minister, especially her husband and British scouts, and said Britain was a country of opportunity and potential.

"There are no barriers for women to serve as British prime minister," she said.

"I resign from the premiership, but I will remain a member of parliament and will play a role in serving Great Britain's future."

May thanked everyone who worked with her and the British people, as well as her husband who supported her during her tenure as prime minister.

She went from Downing Street to Buckingham Palace to resign to Queen Elizabeth.

After May's visit, Britain's Boris Johnson, 55, who won a landslide victory on Tuesday against his foreign secretary, Jeremy Hunt, is due to meet him to form the 14th government.

After the meeting, the new prime minister will deliver a speech and announce his team's lineup.