Prime Minister John Key will give both formal and informal congratulations to new British Prime Minister David Cameron following his Conservative Party's election win.

The centre-right Conservatives won the biggest majority of seats in last week's election, and while it wasn't enough to form a majority government, the party is working towards forming a full coalition with the Liberal Democrat Party, which came third behind Labour.

Both Labour and the Conservatives have been in talks with the Liberal Democrats since the election, but Labour leader and outgoing prime minister Gordon Brown announced his resignation overnight after it became clear his party had lost the race to stay in power.

Mr Key said today he offered his congratulations to Mr Cameron.

"I have sent David Cameron a brief message of congratulations and hope to talk to him on the telephone over the next few days," he said. "I will also be writing formally to him on behalf of the New Zealand Government."

Mr Key also acknowledged the tenure of Mr Brown, and his party's 13 years in office, and wished him well.

"When I went to London after the 2008 election I had the opportunity to meet Mr Brown and found him to be engaging and positive about the strength of the New Zealand-UK relationship."

He said he had also met Mr Cameron and was confident the relationship between the two countries would go from strength to strength under his leadership.

- NZPA