BP says that it has stopped oil from leaking into the Gulf of Mexico from its busted wellhead. It is the first time since April that the oil has stopped.

The company says that the valves on the well have been shut off, and a new cap has been put in place.

After three months of gushing, the oil stopped at 2:25 p.m. local time, said BP.

Earlier, the company began tests on the cap to ensure it would work. BP was set to begin the tests on Wednesday, but detected a leak on a line that was attached to the side of the untested cap -- a 75-ton metal stack of lines and valves that was put in place earlier this week.

After fixing the leak on Thursday morning, BP resumed its testing plans, which involved shutting down the three valves that control the flow of oil through the cap.

In the long run, the cap is only a short-term solution.

Long-term, the goal is to dig two relief wells that will plug the well from below the sea floor.

"Make no mistake, the number one goal is to kill the well … to stop it at the source," said Allen.

In the meantime, BP will carefully check pressure throughout the line for any potential leaks. One possible outcome: as pressure builds under the new cap, fractures could open up elsewhere on the seafloor and make the spill even worse.

If BP's engineers spot any such developments, the new cap will be pulled open and oil will once again spill into the sea.

Allen said that over the two-day period in which the cap is sealed, scientists need to ensure that the oil well under the sea is not seeping past the bedrock which sits under the seafloor.

BP asked that hopes not be raised too much.

"For the people living on the Gulf, I'm certainly not going to guess their emotions," BP vice-president Kent Wells said. "I hope they're encouraged there's no oil going into the Gulf of Mexico. But we have to be careful. Depending on what the test shows us, we may need to open this well back up.

Still, Wells said the developments were heartening.

"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 oil disaster in the Gulf began April 20, when an explosion on the BP-operated Deepwater Horizon oil rig killed 12 people and ruptured the undersea well.

Eighty-six days later, the blown-out well has spewed between 93.5 and 184.3 million gallons of oil into the Gulf.

While some locals were pleased with the developments, others were unsure of how to take the news.

"I don't believe that. That's a lie. It's a (expletive) lie," said Stephon LaFrance, a coastal Louisiana fisherman who has been out of work for weeks. "I don't believe they stopped that leak. BP's trying to make their self look good."

U.S. President Barack Obama also asked for patience and said that more testing is needed.

"We're still in the testing phase," he said Thursday.

With files from The Associated Press