WASHINGTON — A single picture from a cell phone camera may have saved the Gulf of Mexico from a few more weeks – if not months – of oil gushing from the BP well.

A new study from the presidential oil spill commission describes the behind-the-scenes, excruciating tension and mistakes behind the three-month effort to cap the busted well. More than anything the report on containment didn’t blame or praise, but pulled back the curtain on what happened during hectic times as 172 million gallons of oil gushed into the Gulf from April 20 to July 15.

New details include the story of a lone scientist working from a cell phone photo who saved the day by convincing the government that a cap it considered removing was actually working as designed.

The cap that eventually stopped the oil from flowing was nearly pulled about a day after it was installed in mid-July because pressure readings looked so low that they indicated a leak elsewhere in the system. BP wanted the cap left in place and the well to stay shut, but government science advisers were firm and near unanimous in wanting the cap removed because of fear of a bigger, more catastrophic spill, the report said.

One scientist took a cell phone picture of pressure readings and e-mailed it to a government researcher in California for advice.

Just using that cell phone photo, Paul Hsieh, a U.S. Geological Survey scientist, created a model to explain what was happening under the cap and how – despite low pressure readings – there was no leak. He was convinced the containment cap wouldn’t blow. He got more data, which bolstered his case.

Hsieh, a research hydrologist who normally works with water, labored through the night without the aid of caffeine. He stayed up all night triple checking calculations, going on adrenaline.

“I just knew a decision had to be made the next day,” he said. “I had participated in the conference call. I had sensed the tension everyone had and that just kind of kept me going.”

Hsieh laid out his case and it persuaded the other scientists to wait.

The government waited six hours, then a day. Nothing happened. The cap held.

Hsieh turned out to be right.

Hsieh told The Associated Press that he was “flattered that I was portrayed well,” but said others including Energy Secretary Steven Chu, who headed the scientific team, deserve the credit.

The picture Hsieh examined was “a game changer,” said University of California at Berkeley professor Bob Bea, who analyzed the report for the AP.

“It also shows how in disarray we were,” Bea said.

Before the cap was put in place, officials had established pressure levels that would tell them whether everything was OK, there was trouble and the cap had to be removed immediately, or whether it was a wait-and-see situation. The pressure readings were in the wait-and-see zone, but political appointees discussed it further and there was a push to remove the cap. Coast Guard Admiral Kevin Cook urged officials to give the cap more time, then Hsieh’s analysis swayed them.

To Paul Fischbeck, a professor of decision science and engineering at Carnegie Mellon University, this part of the report was scary.

“It became a political decision that they didn’t want to risk having this big blowout,” said Fischbeck, who wasn’t part of the commission. “You set up a logical reasonable process and in the heat of the moment all these factors creep in and it pulls you off what you had logically decided to do. And that is very dangerous when it happens.”

Both Bea and Fischbeck said they consider Hsieh a hero in a chaotic time.