TNK-BP has lost a high court case to prevent a former employee disclosing documents relating to alleged corruption on the eve of a deadline that could decide the ownership of the Russian business.

Mr Justice Morritt, the chancellor of the high court in London, dismissed an attempt by TNK-BP to extend a gagging order obtained in July against its former head of logistics.

Igor Lazurenko left the company in April and TNK-BP started a probe into his alleged fraud which culminated in it seeking to recover allegedly corrupt receipts. The logistics boss struck back, claiming to have documents that showed alleged wrongdoing by senior executives at TNK-BP involving those at state-owned businesses and agencies.

It was this claim that triggered the legal action, although neither BP nor Lazurenko's lawyers wanted to comment after the case.

The blocking of an extended gagging order came just before the midnight Wednesday deadline under which BP was confined to holding talks on the sale of its half-share of TNK-BP with its existing Russian partners.

The Alfa Access Renova (AAR) consortium, led by Russian billionaire Mikhail Fridman, has said it wants to buy out the 50% holding it does not own in TNK-BP, but has also said it would be willing to sell its holding.

Rosneft, the largely state-owned Russian group, has already expressed interest in purchasing the BP stake, a $20bn cash-and-share-swap proposal that is said by its chief executive Igor Sechin to have the agreement of the Kremlin.

Under the terms of the shareholder agreement between BP and AAR, the two sides have been forced to negotiate exclusively for a 90-day period in good faith since BP formally put its stake up for sale in June.

That deadline expires on Wednesday night and while nothing has prevented AAR or Rosneft from putting in formal offers, BP has been constrained from tying up a definite deal with anyone other than AAR, with whom it has had historically difficult relations.

BP has also run into trouble in another former Soviet republic, with the speaker of the national parliament in Azerbaijan saying the UK company is on its final "warning" over oil production failures.

Asadov Oktay has added his voice to those criticising BP for failing to meet expected levels of production from its Azeri-Chirag-Guneshli field in the Caspian Sea.

"BP will fulfil its commitments on oil production in Azerbaijan because it was warned for the last time," speaker of the country's national assembly said on Tuesday, according to the private APA news service.

Its president, Ilham Aliyev, said last week that BP had made "grave mistakes" which resulted in an "unexpected decline" at the country's largest complex of oilfields.

Output fell by 12% in the first half of 2012 compared with the same period last year, but on Monday Azerbaijan's industry and energy minister, Natiq Aliyev, said BP faces "no threat" in the country and its operating licence was safe. A BP spokesman said: "We know there is a problem and want to sort it out."