after explosions sank a nearby platform, Brazil's state oil giant Petrobras said.
An accident during a testing operation early on Thursday morning caused a production pipeline to spew 6,800 gallons (26,000 liters/160 barrels) of crude into the sea and forced the evacuation of most of the 143 workers aboard.
They were transferred for precautionary reasons to neighboring platforms, while 37 workers from the fire and emergency brigades remained aboard the P-7 rig. No explosion, fire or injuries were reported.
"The well is completely sealed and under control and we are going to take the steps to restart production," a Petrobras official said.
The spill was twice as big as initial estimates, but still much smaller than the up to 316,000 gallons of diesel that leaked last month when the Petrobras's biggest offshore platform sank.
"Luckily, this is not a situation involving big environmental damage," said an official at Brazil's state environmental institute Ibama. "The spill is small and it shouldn't reach the shore at all."
Boats and absorption barriers had contained the spill, which was expected to be cleaned up by Saturday.
Petrobras said the platform should resume production within 48 hours. The rig, located 75 miles (120 km) from the coast of Rio de Janeiro state in the Bicudo field in the Campos Basin, produces 15,000 barrels per day (bpd), a small fraction of the company's total of 1.2 million bpd.
The accident occurred when Petrobras tried to shift production into shallower waters and oil started to spurt out of a connection in the pipes, Petrobras said. The company denied there had been a "blowout" or uncontrolled gush of oil.