Prime Minister John Key tonight congratulated Donald Trump on his victory in the US presidential election.

"The American people have spoken and I congratulate Mr Trump on his victory after a long campaign," Keys said.

"I will be writing to Mr Trump to offer my personal congratulations shortly.

"Our two countries share a strong relationship and I look forward to that continuing.

"Over the coming months we will be looking to build close ties with the incoming Trump Administration."

Key also paid tribute to the outgoing administration of President Barack Obama.

"I have had a close and constructive relationship with President Obama and I wish him all the best for his future."