The judges, it is alleged, then asked for an even greater sum for a lighter sentence, money Mr Rifan did not have. Ex-Bali nine lawyer Mohammad Rifan in 2006. Credit:Jason Childs The sensational claims by Mr Rifan that the initial trial of the pair was deeply corrupted were revealed by a joint investigation by Fairfax Media and the former host of SBS' Dateline program Mark Davis, a Gold Walkley-winning journalist. It comes on the eve of the execution of the two Australians, who have been told they will die at midnight on Tuesday, or soon after. Mr Rifan says he has gone public with details of the alleged corruption after waiting for the judicial commission, the Indonesian body that safeguards the probity of judges, to investigate the alleged requests for bribes.

The investigation was prompted after Mr Rifan made a surprise visit to Kerobokan prison on February 7 to meet with the condemned Australians, emerging to tell reporters there had been "interference" in the case. Michael Chan and Chinthu Sukumaran, the brothers of Andrew Chan and Myuran Sukumaran, at Wijaya Pura in Cilacap on Sunday. Credit:James Brickwood "It's something that implicates us, it could discredit me. But for them I will take it," he said. Until now, he has declined to elaborate on the damning, if cryptic, comments. But he says he is now going public because the matter is extremely urgent given the Bali nine pair will soon be shot dead by a firing squad. Bali nine lawyer, Julian McMahon, with three recent paintings by Myuran Sukumuran, among them one marked "Self Portrait, 72 hours just started" as Sukumuran began the countdown to his execution. Credit:Amilia Rosa

In a recorded interview with Davis on Sunday, provided to Fairfax Media, Mr Rifan outlines how he first met with the judges to discuss the bribes and how the intervention from Jakarta, and his own miscalculation, led to the death sentence being applied to Chan and Sukumaran. 'We met many times with the judges' His account provides a disturbing insight into the machinations of Indonesia's legal system, widely pilloried within the country as riven by corruption and wildly inconsistent rulings. "We met many times with the judges," he said. "We were talking about how long the penalty would be. Even though this is prohibited between lawyers and a judge, this is the reality. It's normal." As negotiations proceeded, Mr Rifan says the judges were prepared to offer a sentence of 20 years imprisonment,

"We could not give them what they wanted," he says. "We were asking down to 15 years… "It was more than 1 billion rupiah (about $133,000 at the time) to get a verdict lower than 20 years – 15 or 16 or 17 years like that. So then we had a deal on that." But he says the deal unravelled one or two weeks before the pair were due to be sentenced, when the order allegedly came from upon high came to hand Chan and Sukumaran the death penalty. It is understood that the directive came from the attorney general's office and the supreme court. Following the intervention, Mr Rifan said the judges "started asking for a lot more money".

"I just explained to them how much we had and they said the risk was now too big for them and that the [1 billion rupiah] was not enough." At this point, Mr Rifan says he made a fatal miscalculation. He believed the judges were bluffing. "I thought they were only joking. I thought they would return back to the 20 years if I didn't come up with more money." But, on February 14, 2006, Chan and Sukumaran were sentenced to death. One of the judges involved in the case, Wayan Yasa Abadi, denied in February there had been political interference or negotiations about bribes.

"I can assure you there was none," he told Fairfax Media. "We protected ourselves from everybody. It was purely our decision." Another of the judges, Roro Setyawati, has said she had opposed the death penalty but was overruled by other judges on the panel. 'If they are dead, they cannot be brought back' Mr Rifan accepts that his account of events should be properly tested by a thorough and impartial investigation by the judicial commission. In the meantime, he says, it was vital that the executions of the two Australian heroin smugglers be postponed. "This is an extraordinary situation because it is about lives. … If they are dead they cannot be brought back again."

The meeting between himself and the judges and the alleged interference by Jakarta are both "prohibited" under Indonesian law. "The judges are meant to be independent," he says. Fairfax Media has verified that an account by Mr Rifan has been separately outlined in writing. Meanwhile, Chan and Sukumaran have provided affidavits to the judicial commission. The commission allocated a file number to the case about two months ago, meaning it had formally authorised an investigation. However, Fairfax Media understands the judicial commission still has not interviewed the judges who heard the matter in Bali's district court, or anyone else involved in the matter.

Mr Rifan says the inaction by the judicial commission is puzzling. He has made complaints about judicial irregularities before and "they were much more responsive". "They came to Bali straight away. They do the interview. They asked for the evidence, many things. They were very quick. But why in this case do they do nothing?" The judiciary under the spotlight The handling of the legal cases of the Australians, as well as the other seven drug traffickers slated to be executed alongside them, has sparked criticism of irregularities and interference in the independence of the judiciary. Attorney general HM Prasetyo has consistently said that appeals before the courts should – or will – be rejected even as they were still being considered.

Meanwhile, the country's supreme court and state administrative court rushed through verdicts – all adverse to the condemned drug felons – in unusually rapid time. Indonesia's president Joko Widodo announced in December he would reject the clemency applications of 64 drug convicts on death row before he had examined their cases individually or the felons had exhausted their legal appeals. He said the action was needed to fix the country's "drugs emergency". Mr Rifan says the judicial commission had rebuffed repeated requests to properly investigate the matter before Chan and Sukumaran are executed. "They don't care that some people are about to be shot," he says. "Maybe next month or in two months they will make a decision that the judges made a mistake, that their decision was not independent, that the penalty was invalid from the beginning. … "But if these boys have already died, they are shot, what is the point then?"