A British oil worker kidnapped in Indonesia has been released, the Foreign Office has said.

Engineer Malcolm Primrose, 61, was ambushed by an armed gang as he travelled home from a drilling site in the Aceh region on Tuesday, local reports said.

The Foreign Office said this morning that the 61-year-old is "safe but tired" after his release, which followed a police search of the local area with the assistance of soldiers.

"We are delighted to confirm that Malcolm Primrose has been released," a spokesman said.

"Our officials are with Mr Primrose and providing consular assistance.

"He is safe but tired."

He added that he is not aware of any arrests at this stage.

Scottish Mr Primrose is understood to work for oil and gas company Medco E&P.

The drilling supervisor was reportedly kidnapped at around 11am on Tuesday en route from Medco's oil-drilling site in Blang Simpo to his home in Seumali village.

Up to six men stopped his car in Lubuk Pempeng village and tied up his driver before bundling him into their vehicle.

East Aceh police chief Muhajir told the Jakarta Globe newspaper: "The six perpetrators, carrying three rifles and one pistol, fired a warning shot into the air while intercepting the victim's car."

Earlier Scotland's First Minister Alex Salmond had said "everything will be done to ensure his safe return to his family."

Primrose was found alone at a security post inside a palm oil plantation, East Aceh district police chief Lieutenant Colonel Muhajir told the Associated Press.

The police chief, who uses only one name, said the abductors had contacted Primrose's family and requested a 500,000 US dollars (£320,000) ransom, but then decided to release him after hundreds of police and troops fanned out to hunt for them.

Aceh has a long history of violence, but 29 years of fighting between the government and separatist rebels ended in 2005 after both signed a peace deal.

Efforts to end the civil war gained momentum after a massive earthquake struck in December 2004, triggering a tsunami in the Indian Ocean that killed 230,000 people, half of them in Aceh.

Under the peace agreement, the rebels gave up their long-held demand for independence and handed over their weapons, while the government allowed them to participate in local politics and permitted the predominantly Muslim province to implement a version of Sharia law.

In 2008, a French World Bank consultant was abducted by suspected former rebels in Aceh but released unharmed 24 hours later.

A spokesman for Medco E&P expressed the company's "deepest gratitude" to the local authorities for securing the release of its captured employee.

In a statement the company said Mr Primrose has now returned to his family after being freed around 6am local time.

"Medco E&P Indonesia expresses its deepest gratitude to all parties for their responsive action and quick efforts in ensuring the success of this release," the statement said.

"With the release of Mr Primrose, Medco E&P Indonesia is hoping the security in East Aceh, especially in the operating area, would soon return to normal in order to maintain confidence in a good investment climate."

Primrose has been working in several oil and gas companies in the Aceh region as a drilling expert since 1981, the statement added.