On Friday afternoon, BP senior vice-president Kent Wells was trying hard to contain his elation. The well in the Gulf of Mexico, which had been leaking oil for 88 days, was holding up. The cap, lowered onto the well on Thursday, remained in place. And after numerous failed attempts, the torrent of oil had finally stopped.

"It felt very good to see no oil going into the Gulf of Mexico," Wells told reporters on the daily conference call he hosts from Houston on BP's attempts to stop the leak. An end appeared to be in sight to the worst environmental disaster in US history. Shares in BP rose again on Friday as investors hoped that the company, whose value has plunged by more than a third in the wake of the disaster, was over the worst of the crisis.

But just as the oil has, for now, stopped flowing, the recriminations have already started to fly. Next month BP is expected to report the findings of its own internal investigation into what – or who – it believes caused the disaster. BP's contractors are already preparing their defence if, as seems likely, the finger of blame should point to them.

Given its poor safety record in the US, BP is an easy target. But evidence is emerging that even after a series of major accidents several years ago, safety at its US operations still leaves a lot to be desired. Ken Abbott, a whistleblower from BP's giant deepwater Atlantis platform in the Gulf of Mexico, alleges that operations there are "like a Wild Wild West show".

At the centre of the legal storm now brewing over Deepwater Horizon is the blow-out preventer (BOP). A supposedly failsafe piece of equipment, it is the last line of defence to stop well blow-outs. This one failed, with disastrous consequences. US investigators have already subpoenaed the 450-ton device, and when relief wells finally secure the leak, as early as next month, it will be lifted off the seabed for forensic analysis.

Cameron International, the Houston-based company that manufactured the BOP, has already been hauled before US politicians to explain itself, along with Transocean, which leased the Deepwater Horizon rig to BP. The Observer has learnt how Cameron will try to pin the blame on BP for the failure of the BOP: lawyers will claim that BP ordered Transocean to modify the BOP in China so significantly that the remodelled component no longer resembled what Cameron had originally manufactured.

BOPs are complicated pieces of kit that cost millions of dollars, according to Mike Sawyer, an independent Houston-based oil industry engineer. He told the Observer that it is cheaper – but not uncommon – to get equipment modifications done in countries such as China, India or South Korea rather than the US. He added that it was vital that contractors' work was properly monitored to make sure the oil company's instructions were followed.

But if the BOP was found to have been modified incorrectly by a Chinese contractor, BP could be found liable for damages on its behalf. It would be almost impossible to successfully bring a case against a company in China, where the rule of law is notoriously lax. One industry lawyer says: "An 'empty chair' defence – where BP blamed a Chinese contractor which could not be pursued in the courts – is unlikely to stack up."

Cameron and BP declined to comment this weekend. Transocean, which bought the BOP from Cameron, has already told congressional hearings that it was ordered to modify it in 2005 at BP's expense and under its direction. BP executives in charge of gulf drilling responded that not all the changes made had been documented, which they said had seriously hampered efforts to reactivate the BOP and stop the leak in the critical 24 hours after the explosion.

Under federal law, BP, as the operator of the project, is required to make sure that detailed and up-to-date drawings and documents are kept of the thousands of components, such as the BOP, that make up the Deepwater Horizon. This database is supposed to act as an operating manual, and is crucial – as BP's engineers found to their cost – if something goes wrong.

What has emerged from the congressional hearings is a picture of an oil industry allowed to run riot in the Gulf of Mexico, free of any serious supervision from regulators. One industry safety expert says: "The Gulf of Mexico is one of the last cowboy areas in the US." BP had boasted two months before the Deepwater Horizon explosion that its "strength lies in operating at the frontiers of geography and technology". Going to such extremes in such a "cowboy area", where BP is the biggest producer, turned out to be a lethal combination.

BP is not the only company to benefit from an almost lawless operating environment in the Gulf. But an Observer investigation has uncovered evidence of how BP has benefited from this lack of regulation and failed to use standard procedures in its US operations, particularly offshore.

The company has a reputation with insurers in the gulf for pushing its offshore subcontractors especially hard: according to one well-placed industry source, it was unofficial policy about two years ago for the Houston offices of at least one major insurance company to refuse to process applications for companies working with the oil firm. BP subcontractors seeking well-control insurance, for example, were seen as too high a risk and their applications were not passed on to head office. BP was the only company unofficially blacklisted in this way in the gulf by this insurer, says the source. The evidence given to congressional hearings so far about the events leading up to the explosion on the Deepwater Horizon explosion on 20 April seem to have confirmed the insurers' worst fears.

The charge sheet against BP in the US is long and well documented. Even allowing for its size, it has experienced far more than its fair share of serious accidents. In the four most recent years for which the US government has released figures – 2005 to 2008 – there were 92 fatalities in the US oil and gas industry as a result of fires and explosions. In 2005, the explosion at BP's Texas City refinery alone killed 14 workers, while 11 died when the Deepwater Horizon exploded this year. Again in 2005, its $1bn deepwater platform Thunder Horse almost sank in the Gulf of Mexico because of a technical fault. In 2006, corrosion on BP's Prudhoe Bay pipeline in Alaska resulted in more than 200,000 gallons being spilled, the largest spill in the region to date.

Steve Arendt, a Houston-based oil industry safety specialist who investigated BP's refineries after the deadly Texas City explosion, says he found BP staff resistant to change. He cites new industry standards for refineries, issued in 1996, which included tougher procedures for monitoring and operating "safety critical" equipment in the plant. When Arendt, who is vice-president of ABSG Consulting, reviewed BP's five US refineries a decade later as part of the investigation following the Texas City explosion, he found that only one refinery had seriously begun thinking about how to implement the guidelines: "One group was waiting for the other group to do something, and was worried about the effect on the others of acting first." Most other US refineries were still in the process of implementing the guidelines, but BP lagged behind the industry on the issue, Arendt says. And its sheer size – Arendt calls BP "the largest and most complicated entity I have seen other than the US government" – made it even harder to implement change, he believes. Refinery personnel would "push back" on the new practices, he suggests: "For a while after the Texas City explosion it seemed to as though BP was a little bit in denial about how pervasive the problem really was."

Speaking to a BP official in Houston last month, where the company's US headquarters and its gulf disaster response effort are based, the Observer got a taste of this apparent arrogance and resistance to outside views. Asked about scientists' fears that currents could carry the spilt oil past Florida and towards the east coast of the US and the Atlantic, the official added with sarcasm, "or the moon", clearly believing that the widely held fears were exaggerated. BP has consistently dismissed the views of scientists not under its influence, for example rejecting their evidence of the existence of underwater slicks. BP also seemed to have too much confidence in its ability to control the gushing well. It is impossible to quantify the impact this corporate culture has on BP's safety record, but it is reasonable to suggest that such resistance to change and outside views would increase the likelihood of accidents.

Certainly, the number of violations at BP's refineries cited by the Occupational Safety and Health Administration (Osha), the US federal regulator, suggest that, five years after Texas City, the company has some way to go to clean up its act. When Osha inspected 55 refineries between June 2007 and February this year, 97% of the serious violations it cited were against two of BP's plants. Over 700 violations against BP are outstanding. The Department of Justice could launch an investigation if it believes the company has violated the terms of the probation deal it struck following the Texas City explosion.

BP has said it believes it is in "full compliance" and is co-operating with Osha to "resolve the matters". Arendt says it is fairly normal for there to be differences in opinion with the regulator over the pace at which new processes are introduced, for example, but that such a large judgment gap is rare.

Ken Abbott worked as a subcontractor on BP's Atlantis production platform in the Gulf of Mexico, the world's deepest moored oil and gas platform production facility, operating in more than 7,000 feet of water. He claims that in his 30-year career in the oil industry, he has never seen such disregard for safe engineering procedures.

One of his responsibilities was to manage the database of documents relating the platform's components. He took the role in August 2008, when Atlantis had been in production for over a year. Abbott, who along with campaign group Food and Water Watch has filed a lawsuit against BP, has testified in congressional hearings that the company was not keeping a complete database. He claimed that almost 90% of the 7,000 documents in the database had not received engineering approval, which meant they did not indicate the exact, "as-built", final form of the components. He provided the congressional committee with an email from his predecessor that said this "could lead to catastrophic operator errors".

He told the Observer that BP engineers on the project refused his requests to complete the documentation. "They admitted that the drawings were not complete. But their tone was: 'Why do we have to review and approve them and sign them off?' They got pretty angry that I tried to push that." He alleges that the engineers complained to his manager, and eventually he was fired in February 2009 – over this issue, he claims.

Completing the drawings properly would have taken thousands of man-hours, he says, and possibly several months, potentially disrupting tight production schedules. "The big concern and primary driver was cost. I felt there was a whole lot of pressure on contractors to come up with the least cost. Everyone knew that the quickest way to get run off [the job] was not to find the cheapest way." He filed a complaint to BP's independent safety ombudsman, and a letter, seen by the Observer and dated April 2010, says that Abbott's claims were "substantiated".

BP insists that the allegations are unsubstantiated, and that it has complied with regulations regarding compiling and retaining as-built documents. A spokeswoman referred to a previous company statement on the issue that says: "The engineering documents for Atlantis have the appropriate approvals and platform personnel have access to the information they need for the safe operation of the facility." Nevertheless, it has emerged that the drawings on the Deepwater Horizon's failed BOP do not appear to be up to date, according to evidence given to Congress.

In the hours after the explosion on the rig, BP officials asked Transocean for drawings of the device. But as the BOP had been modified in China and the drawings Transocean supplied had not been updated, they did not match what was on the sea floor. BP says engineers wasted crucial hours trying to work out how to remotely activate the device, which represented the last chance of shutting down the well. They knew the gushing oil and debris would be shredding the blades of the BOP's blind shear ram, which had to cut through the pipe to close off the well. More than a day after the explosion, they finally tried to reactivate it, but the ram did not budge.

BP is the biggest employer in Houston, the home of close-knit Big Oil in the US, and uses dozens of contractors. It is not surprising that Abbott's employer apparently took BP's side over his and why contractors may be reluctant to hold BP to account. Sawyer says: "You would become a pariah if you fall out with BP. People start to look at you differently. If you are seen as a whistleblower of some sort, you get shunned."

He says that in presentations, BP executives like to use a "Swiss cheese" analogy to explain how an accident occurs. Its safety procedures or barriers – the slices of cheese – are supposed to stop a problem getting through, but gaps appear as a result of human error or the error of subcontractors. For example, BP initially blamed the explosion at Texas City on plant managers, whom they fired. Days after the Deepwater Horizon explosion, BP publicly tried to pass off responsibility onto Transocean.

When Hayward became chief executive of BP in 2007, he promised to focus "like a laser" on safety after the accidents which had taken place under the watch of his predecessor ,Lord Browne. Trevor Kletz, visiting professor at Loughborough University, and an expert on chemical engineering safety, says that it would be unfair to blame Hayward for the Deepwater Horizon disaster: it can take 10 years even for companies genuinely committed to improving safety to affect real change on the ground, he says.

The investigations into how the gulf disaster happened – and in particular how the BOP failed – have only just begun. Arendt says that BP eventually accepted the safety panel's findings and made many safety improvements following the Texas City explosion, despite the numerous violations outstanding: "But because of the Deepwater Horizon accident, many wonder if these lessons and improvements were integrated into BP's Gulf of Mexico operations."