A London minicab firm that urged its drivers to defy a ban on using bus lanes has been restrained by the high court.

Mr Justice Eder granted an injunction to prevent Addison Lee from instructing its drivers to use bus lanes marked for use by black taxis during the hours when restrictions apply. Following an application by Transport for London, he also instructed the private hire company not to repeat an offer to pay its drivers' fines or other penalties. The company agreed to remove a statement from its website exhorting its drivers to disobey the law.

The campaign of deliberate law-breaking was launched last week and is the latest tactic in an multi-million pound battle between Addison Lee, led by multimillionaire Conservative party donor, John Griffin, and the black cab trade.

Griffin had told drivers: "Addison Lee believes that we cannot allow our customers to continue to be victims of this unfair and discriminatory treatment … As chairman, I can advise you that a lawful interpretation of the bus lane regulation entitles Addison Lee drivers with private hire identifiers to use all bus lanes in the same way as our competitors. Accordingly, you are fully entitled to use the bus lanes."

In a written judgment handed down on Thursday morning, the judge said: "It is both necessary and just and convenient to grant the injunction sought by TfL … an injunction restraining the defendants from causing, encouraging or assisting any private hire vehicle driver to use bus lanes marked for use by taxis during the hours when restrictions apply, save to pick up or set down passengers."

The verdict was welcomed by Transport for London, which said: "Addison Lee's instruction to its drivers was irresponsible and at odds with its position as a private hire operator."

"Bus lanes enable buses to move around the capital efficiently carrying more than 6 million passengers a day," said Leon Daniels, TfL's managing director of surface transport. "We maintain that allowing tens of thousands of private hire vehicles to drive in bus lanes would impact on the reliability of our bus services, and risks inconveniencing our customers."

The judge referred to evidence from Transport for London that showed 60 Addison Lee cars had been issued with penalty charge notices for driving in bus lanes in the first four days of the firm's campaign, which began on 16 April. He said: "Drivers would of course be free to choose whether or not to use bus lanes and incur the risk of prosecution," but said he must restrain the company from encouraging them because of the risks for London's roads. He described the risk of confusion among drivers, congestion and traffic disruption, and that "enforcement against all those committing contraventions will become very difficult or impossible (straining TfL's resources and those of the Metropolitan police)."

However, the injunction was only granted temporarily and the judge ordered the courts to speed up Addison Lee's application for a judicial review of legislation that prevents private hire vehicles from using bus lanes. Griffin has said his firm loses millions of pounds a year because its drivers are denied access and claims the rules breach the principles of free competition.

The judge recognised that the injunction would cause Addison Lee a loss of profits it could have gained by using the bus lanes. He said: "The situation is time-critical as the London Olympics and peak tourist season approaches."

Addison Lee pointed out that TfL had dropped its demand that it should withdraw the notice altogether, although the injunction does prevent the firm from repeating it.

"This is a great start to our campaign to challenge the unfair bus lane legislation," said Griffin. "We hope to fully overturn the legislation to offer faster journey times to our customers and to offer a competitive transport service during the Olympic Games."