Image copyright Getty Images Image caption The bodies of the executed prisoners were brought back to the mainland amid a tight police presence

Indonesia has carried out the executions of four drug convicts, including three foreigners.

The Indonesian man and three Nigerians were killed by firing squad shortly after midnight local time (17:00 GMT) at the Nusakambangan prison island.

A further 10 convicts who had been expected to be killed had a last-minute stay of execution.

Amnesty International condemned the killings as a "deplorable act" that violated local and international law.

Indonesia's Deputy Attorney-General Noor Rachmad said it was "not a pleasant thing but it was to implement the law".

"The executions are only aimed at halting drug crimes," he said, adding that the rest "will be carried out in stages".

Media playback is unsupported on your device Media caption The BBC looks at the prison which has been called 'the Alcatraz of Indonesia', where condemned prisoners are executed by firing squad

Indonesia has some of the world's toughest drug laws, and has faced intense criticism internationally for resuming executions.

In April 2015, the execution of 14 drug convicts, mostly foreigners, was widely criticised.

Australia briefly withdrew its ambassador from Indonesia in protest over the execution of its citizens, Andrew Chan and Myuran Sukumaran.

Cases of concern

Those executed on Friday have been named as Indonesian Freddy Budiman and Nigerians Seck Osmane, Humphrey Jefferson Ejike and Michael Titus Igweh.

Relatives had gathered at the prison earlier in the day to say final goodbyes.

Image copyright AFP Image caption Relatives of Pakistani national Zulfiqar Ali have staged protests in Lahore

In the early morning, ambulances returned to the mainland carrying the prisoner's bodies to be returned to their relatives for funerals.

Authorities did not give a reason for the reprieve given to the other 10 inmates, but island was hit by a major storm as the other executions took place.

Those awaiting executions include three Indonesians, a Pakistani, an Indian, one Zimbabwean and four other Nigerians.

Activists have been particularly concerned by the cases of the Pakistani man, Zulfiqar Ali - who they say was beaten into confessing to heroin possession - and an Indonesian woman, Merri Utami - who says she was duped into becoming a drug mule.

Ricky Gunawan, lawyer for Humphrey Jefferson Ejike, said the execution process was "a complete mess".

"No clear information was provided to us about the time of execution, why only four [were executed] and what happens to the 10 others," he told AFP.

A number of Europeans on death row for drug offences, including Frenchman Serge Atlaoui and British grandmother Lindsay Sandiford, seem likely to avoid execution.

Indonesian President Joko Widodo vowed to take a hard line against drug trafficking when he was elected in 2014, saying he would not compromise over death sentences to convicted drug dealers.

This is the third round of executions under Mr Widodo.