Indonesia executed four people convicted of drug crimes on Friday despite international protests and said it would decide later when as many as 10 others are put to death.

One Indonesian and three Nigerians were executed by firing squad not long after midnight local time as torrential rains hit the Nusa Kambangan prison island where the death row inmates were held.

The government had said earlier in the week that 14 people on death row, mostly foreigners, would be executed for drug crimes.

Those executed were Indonesian Freddy Budiman and Nigerians Seck Osmane, Michael Titus and Humphrey Jefferson.

Relatives, rights groups and foreign governments had urged Indonesia to spare all 14 lives but it was unclear whether that had any influence on the decision to not carry out all the executions at once. Lawyers and rights groups had raised serious doubts about the legitimacy of the conviction of Jefferson, who had been in prison for more than a decade, as well as the convictions of an Indonesian woman Merri Utami and a Pakistani man Zulfikar Ali.

Ricky Gunawan, a lawyer from Community Legal Aid Institute who represented Jefferson and Utami, said the government's unpredictable handling of the process was "tantamount to torture" for those who had been prepared to die. He had not been able to speak with Utami since the government announced the four executions and nor had her appointed spiritual adviser, a Catholic priest.

"She has been in an isolation cell for three days and on the last day she had a very sad farewell with her family members," he said. "Then apparently she is not executed."

It was the third set of executions under President Joko "Jokowi" Widodo who was elected in 2014 and campaigned on promises to improve human rights in Indonesia. Last year, Jokowi's government executed 14 people convicted of drug crimes, mostly foreigners, sparking a huge outcry abroad, and particularly in Australia, which had two citizens among those condemned.

The latest executions did not attract the same level of media attention abroad but the European Union, U.N. Human Rights Office, Australian government and others continued to speak out against Indonesia's use of the death penalty. Indonesia says it is facing a drug abuse epidemic and believes putting drug traffickers to death will act as a deterrent

In Pakistan, dozens of Zulfikar Ali's relatives distributed sweets to well-wishers outside the family's home in the eastern city of Lahore to express relief and joy over his life being spared.

"We were trembling with fear and we were in state of anxiety and depression," said his sister Sajida Bibi. Then a telephone call came from Ali's wife in Indonesia. "Now I have tears of happiness in my eyes," she said.

"God willing, my brother will come back alive, and we hope that Indonesia will free him as he is innocent," Bibi said.

Pakistan's Foreign Ministry said Ali's execution "has been stopped for now" following diplomatic contacts between Pakistan and Indonesia.

In preparation for the executions, a convoy of 17 ambulances, most carrying coffins, had arrived Thursday morning at the port town nearest Nusa Kambangan and were ferried to the island. Officials began tightening security at the prison several days ago, with more than 1,000 police sent to Cilacap, the port town, and the prisoners moved into isolation cells.

The English-language Jakarta Post newspaper apologized on its website Friday for going to print with a front-page story that said 14 people had been executed. "The failure to do the verification before running the story is completely unprofessional," it said.

Attorney-General Muhammad Prasetyo told a news conference that the severity of the drug crimes and exhaustion of all appeals was a consideration in the execution of the four men. A decision about other executions would be announced at a later time, he said. The comments suggest authorities decided at the last minute that the legal grounds for execution in the other cases were not entirely satisfied.

"I can say that the four executed inmates had important roles either as kingpin, supplier, distributor, providers, and producer as well as importer and even acted as exporters of the drugs," Prasetyo said. "They all have passed through all legal stages, including extraordinary appeals."

The remains of Osmane and Titus will be flown to their home country and Jefferson will be buried in Indonesia.

Gunawan said there had been no explanation from officials at Nusa Kambangan about the decision to execute only some of the prisoners. But he said it was telling that Africans were eight of the 10 foreigners on the execution list and three of the four killed.

"They felt they were targeted by the government of Indonesia only because they are Nigerians, only because they are Africans, and their governments did not do anything" to help them, he said. "They felt they became an easy target to execute."

The government of Jokowi's predecessor did not carry out executions between 2009 and 2012, but resumed them in 2013.

Worldwide, China is believed to be the country with the highest number of executions but it does not release figures. Amnesty International estimates several thousand people are executed in China each year.

Of the more than 1,600 publicly announced executions last year, Amnesty says nearly 90 percent of them were in three countries: Saudi Arabia, Pakistan and Iran.

___

Wright reported from Jakarta. Associated Press writers Munir Ahmed in Islamabad, Pakistan and Niniek Karmini and Ali Kotarumalos in Jakarta contributed.