The Formula One boss, Bernie Ecclestone, is to make a $100m (£60m) payment to end his trial on bribery charges, a district court in Munich has confirmed.

Ecclestone, 83, went on trial in Munich in April over allegations that he bribed a former German banker as part of the sale of a major stake in the motorsport business eight years ago.

German law provides for some criminal cases to be settled with smaller punishments, such as fines, though the size of the payment in Ecclestone's case has led some to question a system that effectively favours wealthy defendants.

The Munich court said in a statement that $99m would be paid to the German treasury and a further $1m to a German children's hospice charity. The money will be paid within a week, after which time the trial will officially be abandoned.

The chief executive of Formula One was accused of having paid the former Bayern LB chief risk officer Gerhard Gribkowsky $44m in 2006 to ease the sale of the bank's share to a company that had guaranteed to keep Ecclestone in his job. He has admitted paying the money but denied it was a bribe.

In an explanation of its decision, the court said it had "considerable doubts" about whether Ecclestone knew Gribkowsky held that particular position at the time of the alleged bribe.

"Accordingly, a prosecution of the accused due to bribery is not probable as things stand," the court said, despite admitting that all evidence in the case had not yet been heard.

A paragraph in the German criminal code allows for trials to be ended under conditions that are "appropriate for resolving the public interest in a prosecution", as long as the gravity of wrongdoing does not outweigh doing so.

Wealthy defendants have used this clause to buy their way out of trials, but no one has ever paid as high a sum as has been agreed with Ecclestone.

Speaking on German radio on Tuesday, Germany's former justice minister Sabine Leutheusser-Schnarrenberger called the deal "cheeky". If it were to go through, she said, "it would not be consistent with the spirit and purpose of our legal system".

The sum on the table proved that Ecclestone's wrongdoing was weighty enough that such a deal was inappropriate in this case, she said, and called for politicians to tighten the loophole.

Over the course of the trial, witness testimonies had thrown increasing doubt on the accuracy of Gribkowsky's bribery accusations. One witness claimed Gribkowsky had got carried away with the idea of succeeding Ecclestone at the helm of Formula One, describing the banker as a "choleric disciplinarian".

Eccelstone's lawyer, Sven Thomas, defended the settlement negotiations, saying his client had been suffering from an "extremely burdensome procedure". The British billionaire could have faced up to 10 years in jail and would have had to cede control of a business he has built up over the last four decades.

"Through this abandonment the presumption of innocence in favour of Mr Ecclestone remains intact," the defence team wrote in a separate joint statement signed by his lawyers.

"As is the case with any other defendant who fulfils the conditions for section 153 a Criminal Procedure Code, the monetary compensation is geared to his income and financial situation," it said.

The state prosecutor had told the court that Ecclestone's advanced age and other circumstances supported the acceptance of a settlement.