Nine drug traffickers met their families for what could be the final time at an Indonesian maximum security prison on Tuesday, after Jakarta rejected international pleas for clemency and ordered their mass execution to proceed, possibly within hours.

The death penalties imposed on eight foreigners and an Indonesian have been condemned by the United Nations, and strained ties between neighbors Australia and Indonesia.

Security at the prison was heightened and religious counselors, doctors and the firing squad were alerted to start final preparations for the execution of the four Nigerians, two Australians, an Indonesian, a Brazilian and a Filipina.

"We're hoping for a miracle," said Marites Veloso, the sister of death-row inmate Mary Jane Veloso of the Philippines, on her way to the prison.

A dozen ambulances, some carrying white satin-covered coffins, arrived at the Nusakambangan prison island in central Java, where the nine are expected to be executed as early as Tuesday night.

In chaotic scenes outside the jail, Australian family members, some weeping, arrived early to offer their final goodbyes to Myuran Sukumaran and Andrew Chan. One family member collapsed and was carried through the crowd. The convicts will no longer be able to receive visitors from 8 p.m. local time (1300 GMT) on Tuesday, an indication the execution will likely take place soon thereafter.

Indonesian authorities have declined to specify a time for the executions, due to take place at a nearby clearing in a forest.

The prisoners will be given the choice to stand, kneel or sit before the firing squad, and to be blindfolded. Their hands and feet are tied.

Twelve marksmen are assigned to fire at the heart of each prisoner, but only three have live ammunition. Authorities say this is so that the executioner remains unidentified.

Counselor denied access

Authorities on Monday granted Chan's last wish, which was to marry his Indonesian girlfriend Febyanti. A small group of family and friends attended the ceremony in his prison cell.

Rebuffing last-minute appeals from Australia and the Philippines to spare their nationals, Attorney General H.M. Prasetyo told Reuters late on Monday that the nine had been given notice and had been placed in isolation cells.

Australian Foreign Minister Julie Bishop said she had received a letter from her Indonesian counterpart that gave no indication President Joko Widodo would change his mind and grant the clemency requested by Australia.

Indonesia's neighbor has been pursuing an eleventh-hour campaign to save the lives of Sukumaran and Chan, who were arrested in 2005 as the ringleaders of a plot to smuggle heroin out of Indonesia.

The pending executions have strained Indonesia's relations with Australia, Nigeria and Brazil, which will likely worsen after the death sentences are carried out.

Adding to the tensions, a religious counselor who has known the Australian men for years said he was refused permission on Tuesday to visit the pair in their final hours.

Australia-Indonesia relations have been tested in recent years by disputes over people smuggling and spying. In late 2013 Indonesia recalled its envoy and froze military and intelligence cooperation over reports that Canberra had spied on top Indonesian officials, including the former president's wife.

"We don't want to make enemies with any country, but we are fighting narcotics whose impacts are horrific, especially in Indonesia," Prasetyo said.

Filipino boxing superstar Manny Pacquiao, who is in the United States for a title fight, made a televised appeal to Widodo on behalf of his countrywoman, Veloso: "I am begging and knocking on your kind heart that your Excellency will grant executive clemency to her."

Dozens of protesters, mostly Philippine and Indonesian migrant workers, gathered at the Indonesian Consulate in Hong Kong on Tuesday to protest against the imminent execution of Veloso, who maintains she was an unwitting mule for the heroin that was found in the lining of her suitcase.

A group of Australian celebrities, including Oscar winner Geoffrey Rush, made a video titled "Save our boys, Mr. Abbott", urging Australian Prime Minister Tony Abbott to dash to Jakarta on a mercy mission for Sukumaran and Chan.

Indonesia has harsh punishments for drug crimes and resumed executions in 2013 after a five-year gap. Six have been executed so far this year.

This round of simultaneous executions have been delayed for weeks due to a series of last-minute legal challenges. The Constitutional Court on Monday agreed to hear a final challenge by the Australian pair, but the government said the executions would not be delayed any longer.

"Something we want to revise now are the legal reviews because these reviews have no time limit," Prasetyo said. "We will recommend a time limit. There will be legal certainty."

Widodo's steadfastness on the executions, which has strong public support at home, stands in contrast to a series of policy flip-flops since he took office six months ago. Palace insiders and government officials portray him as sometimes out of his depth and struggling to get around entrenched vested interests.