Striking resemblances between BP's Gulf of Mexico disaster and a little-reported giant gas leak in Azerbaijan experienced by the UK firm 18 months beforehand have emerged from leaked US embassy cables.

The cables reveal that some of BP's partners in the gas field were upset that the company was so secretive about the incident that it even allegedly withheld information from them. They also say that BP was lucky that it was able to evacuate its 212 workers safely after the incident, which resulted in two fields being shut and output being cut by at least 500,000 barrels a day with production disrupted for months.

Other cables leaked tonight claim that the president of Azerbaijan accused BP of stealing $10bn of oil from his country and using "mild blackmail" to secure the rights to develop vast gas reserves in the Caspian Sea region.

WikiLeaks also released cables claiming that:

• Senior figures in Thailand are concerned about the suitability of the crown prince to become king, citing rumours that he has lovers in several European capitals in addition to his wife and son in Thailand.

• American energy firm Chevron was in discussions with Tehran about developing an Iraq-Iran cross-border oilfield, despite US sanctions against Iran.

The leaks came as the whistleblower site's founder Julian Assange prepared for another night in jail ahead of tomorrow's high court challenge to the decision to grant him £200,000 bail. Swedish authorities, who want to question Assange on allegations of sexual assault, believe he should remain in custody as he is a flight risk.

On the Azerbaijan gas leak, acable reports for the first time that BP suffered a blowout in September 2008, as it did in the Gulf with devastating consequences in April, as well as the gas leak that the firm acknowledged at the time.

"Due to the blowout of a gas-injection well there was 'a lot of mud' on the platform, which BP would analyze to help find the cause of the blowout and gas leak," the cable said.

Written a few weeks after the incident, the cable said Bill Schrader, BP's then head of Azerbaijan, admitted it was possible the company "would never know" the cause although it "is continuing to methodically investigate possible theories".

According to another cable, in January 2009 BP thought that a "bad cement job" was to blame for the gas leak in Azerbaijan. More recently, BP's former chief executive Tony Hayward also partly blamed a "bad cement job" by contractor Halliburton for the Deepwater Horizon disaster in the Gulf of Mexico. The blowout in the Gulf led to the deaths of 11 workers and the biggest accidental offshore oil spill in history.

BP was also criticised for not initially sharing all its information with the US authorities about the scale of the Gulf spill. The gas field in the Caspian Sea was in production when the leak and blow out occured, unlike the well in the Gulf which was being drilled to explore for oil.

BP declined to answer questions put by the Guardian about the cause of the Azerbaijan gas leak and who carried out the cement job, pointing to a general statement it had made about the cables.

The cable reveals that the company had a narrow escape. "Given the explosive potential, BP was quite fortunate to have been able to evacuate everyone safely and to prevent any gas ignition. Schrader said although the story hadn't caught the press's attention, it had the full focus of the [government of Azerbaijan], which was losing '$40-50m each day'."

The leak happened at the Azeri-Chirag-Guneshi (ACG) field, Azerbaijan's largest producing oil field in the Caspian where vast undeveloped gas reserves also lie. BP is the operator and largest shareholder in the consortium, which includes US companies Chevron, ExxonMobil and Hess (formerly Amerada Hess), as well as Norwegian firm Statoil and Azerbaijani state owned oil company Socar.

BP comes in for criticism for allegedly limiting the information it made available about the incident. Another cable records shortly after the incident: "ACG operator BP has been exceptionally circumspect in disseminating information about the ACG gas leak, both to the public and to its ACG partners. However, after talking with BP and other sources, the embassy has pieced together the following picture." It goes on to say the incident took place when bubbles appeared in the waters around the Central Azeri platform, signalling a nearby gas leak. "Shortly thereafter, a related gas-reinjection well for Central Azeri had a blowout, expelling water, mud and gas." BP's annual report last year referred to a "comprehensive review of the subsurface gas release" having taken place and remedial work being carried out.

The cable continues: "At least some of BP's ACG partners are similarly upset with BP's performance in this episode, as they claim BP has sought to limit information flow about this event even to its ACG partners. Although it is too early to ascertain the cause, if in fact this production shutdown was due to BP technical error, and if it continues for months (as seems possible), BP's reputation in Azerbaijan will take a serious hit."

BP is in charge of Azerbaijan's key energy projects, and has a significant influence across the region. In late 2006 discussions were taking place about when Turkey would be able to link up its own network to a new pipeline operated by BP transporting gas across the Caucasus from BP's giant new Shah Deniz field in Azerbaijan. The new pipeline was seen as crucial as reducing the region's dependence on unreliable gas supplies from Russia, particularly amidst rising gas prices.

According to one cable, BP's outgoing Azerbaijan president, David Woodward, said in November 2006 that BP thought it unlikely that Turkey would be able to complete its work before spring 2007. "However, he added that 'it was not inconceivable' that Botas [Turkey's state pipeline company] could 'rush finish' the job so that it would be ready to receive gas shortly, although the pipeline would not meet international standards," the cable said. In the end, BP said Turkey began receiving gas from Shah Deniz in July 2007.

The cables also reveal BP concerns on the lack of security at the time around its oil and gas installations, particularly in the Caspian Sea, which it believed made them vulnerable to terrorist attack. One cable from July 2007 records: "BP Azerbaijan president Bill Schrader has told US officials in private conversations, 'all it would take is one guy with a mortar or six guys in a boat' to wreak havoc in Azerbaijan's critical energy infrastructure."

BP officials also complained about a shortage of Navy and Coast Guard boats – mostly Soviet era and built in the 1960s and 1970s – to patrol the waters around the platforms. It was also not clear which government agency or branch of the military was in charge, meaning a "response to a crisis offshore could be problematic" , one cable in August 2008 recorded.

The oil firm said BP "enjoys the continued support and goodwill of the government and the people of Azerbaijan".

The oil firm said in a statement that: "BP continues to have a successful and mutually beneficial partnership with the government of Azerbaijan. This cooperation has produced and contunues to produce benefits to all parties involved and most importantly to the nation of Azerbaijan. The Government of Azerbaijan has entrusted us with the development of its major oil and gas development projects on the basis of Production Sharing Agreements (PSAs) that are enacted as laws in Azerbaijan. The operatorship of PSAs of this scale and size require cooperation and alignment between contractors and the Government. BP in Azerbaijan enjoys the continued support and goodwill of the Government and the people of Azerbaijan to meet its obligations. As part of maintaining this successful partnership we meet and discuss business related matters with relevant parties including our partners, SOCAR, and the Government. These discussions are confidential and as such we will maintain that confidentiality and not comment on specifics."