Kent Wells, a BP vice president, said at a news briefing that oil stopped flowing into the water at 2:25 p.m. CDT after engineers gradually dialed down the amount of crude escaping through the last of three valves in the 75-ton cap.

"I am very pleased that there's no oil going into the Gulf of Mexico. In fact, I'm really excited there's no oil going into the Gulf of Mexico," Wells said.

The stoppage came 85 days, 16 hours and 25 minutesafter the first report April 20 of an explosion on the Deepwater Horizon oil rig that killed 11 workers and triggered the spill.

Gulf Oil Flow Brought to Stop

BP shares jump after the Gulf oil spill is brought to a stop. CNBC's Bertha Coombs has the details.

Now begins a waiting period to see if the cap can hold the oil without blowing a new leak in the well. Engineers will monitor pressure readings incrementally for up to 48 hours before reopening the cap while they decide what to do.

Though not a permanent fix, the solution has been the only one that has worked to stem the flow of oil since April. BP is drilling two relief wells so it can pump mud and cement into the leaking well in hopes of plugging it for good by mid-August.

BP has struggled to contain the spill and had so far been successful only in reducing the flow, not stopping it. The company removed an old, leaky cap and installed the new one Monday.

Between 93.5 million and 184.3 million have already spilled into the Gulf, according to federal estimates.

BP Shares Rise on News

BP shares rose $3.25, or 9 percent, to $39.43 Thursday afternoon and have gained about 46 percent since hitting a 14-year low of $27.02 on June 25.

BP shares were up about 3 percent as BP began testing a cap atop the gushing oil well. The shares shot higher when BP announced the oil had been stopped when all valves on the cap were shut, as part of the test.

Still, the shares are well below the $60.48 they fetched on April 20 when a BP-operated rig exploded and subsequently sank.

The shares will have closed higher in 12 of the last 14 trading sessions if the gains hold.