Lord Justice Thomas, deputy head of criminal justice, complained that he had wanted to impose a fine running into "tens of millions" on the Cheshire-based chemical firm Innospec for bribing senior Indonesian officials but had only been able to make it pay a "wholly inadequate" £8m.

He said prosecutors should not be able to agree plea bargains after deciding that Richard Alderman, the SFO director, had no legal power to agree such a deal with the multi-national firm.

The judgment casts doubt on whether a similar plea bargain with BAE – criticised by campaigners for being too gentle on the arms giant – can go ahead.

Alderman had encouraged companies to cut such US-style plea bargains as a way of admitting their corruption and starting afresh while avoiding a long and costly court case. His agency has only recently started to make any headway in prosecuting bribery after years of criticism that the government was turning a blind eye to it.

Thomas said the payment of bribes by British firms abroad was one of the worst corporate crimes in the book. Innospec's corruption involved "the payment of very substantial amounts to senior officials of the government of Indonesia over a long period of time".

He said the firm had also paid bribes to delay Indonesia outlawing one of its poisonous products prolonging "damage to the people of Indonesia and the environment". The product, used in leaded petrol, had already been banned in Britain and other countries for being too harmful to humans.

His hands had in effect been tied, the judge said, by a plea bargain struck before Innospec had come before the court.

The firm had agreed to admit its bribery and in return, prosecutors had agreed a specific penalty to recommend to the judge.

Sentencing the firm at Southwark crown court, Thomas underlined that it was a constitutional principle that judges in England and Wales were responsible for deciding sentences.

"The director of the SFO had no power to enter into the arrangements made and no such arrangements should be made again," he said.

Anti-corruption campaigners have criticised the SFO for letting BAE plead guilty to minor offences and a small penalty to end years of bribery investigations. That deal, announced in February, has yet to come before a court.

Susan Hawley of campaigners Corruption Watch said the BAE deal would have to be renegotiated following a "remarkable and ground-breaking judgement" by Thomas. "The SFO's plea-bargain approach over overseas corruption has been shown to be far too lenient, utterly untransparent and potentially unconstitutional."