King Harald of Norway has had a temporary pacemaker implanted at a hospital in Malaysia’s resort island of Langkawi.

Europe’s oldest monarch is being treated for an infection after becoming ill during a holiday this week, the Norwegian royal house said.

“The pacemaker was implanted due to a low heart rate,” the Royal House of Norway said in a brief statement, adding that the procedure was successful.

The Norwegian king is being treated in hospital at Langkawi (AP)

Following the operation, Harald, 87, would likely be transported back to Norway “within the next couple of days”, the statement said.

The palace in Oslo added: “His Majesty is doing well under the circumstances but still requires rest. The procedure will make the return back home safer, according to His Majesty The King’s personal physician, Bjorn Bendz.”

The royal house said on Tuesday that Harald, Europe’s oldest reigning monarch, was taken to hospital after he fell ill during a private vacation in Langkawi. Norwegian media outlets said Harald travelled to the Malaysian resort island to celebrate his 87th birthday.

Two days before his birthday last week, Norwegian news agency NTB reported that Harald V was undertaking a private trip abroad together with his wife Queen Sonja, without specifying the destination or dates.