A Finnish couple and an Austrian student abducted in Yemen by al-Qaeda fighters more than four months ago have been freed and handed over to Omani authorities, a Yemeni official said.

The three Europeans, seized in Sanaa on December 21, were freed by local tribesmen on the border with Oman overnight Wednesday, the official said on Thursday.

"The three hostages were released overnight Wednesday and they are now with Omani authorities," said the official on condition of anonymity.

"They were kidnapped by al-Qaeda militants," the official added.

The three were seized by masked gunmen in an electronics shop in the capital and moved to different locations around Yemen, the official said, winding up in Hawf, a village on the Omani border.

He said Hawf residents had arrested the kidnappers and set free the hostages who were handed over to Omani authorities.

There was no immediate confirmation from Oman about their whereabouts.

At the end of March, the foreign minister of Finland held talks in Sanaa with President Abdrabuh Mansur Hadi about the fate of the hostages.

In February, the Austrian student appeared in a YouTube clip with a gun to his head, saying his captors would kill him unless Austria, Yemen and the European Union met their ransom demands.

In early January, Yemeni security officials said the Europeans were being held by al-Qaeda-linked tribesmen in Marib province of eastern Yemen.

Al-Qaeda militants, active in the south and east of Yemen, rarely carry out kidnappings, but a Saudi diplomat, Abdullah al-Khalidi, has remained in the hands of the network since his abduction in Aden on March 28, 2012.

Most kidnappings of foreigners in Yemen are carried out by members of its powerful tribes who use them as bargaining chips in disputes with the central government.

Hundreds of people have been abducted over the past 15 years. Almost all have been freed unharmed.