A US federal judge has dismissed prosecutors' argument that a BP subsidiary violated its probation after an oil spill because of another spill on Alaska's North Slope.
Judge Ralph Beistline also lifted BP Exploration (Alaska)'s probation altogether.
BP had been convicted of negligent discharge of oil in 2007 for a 200,000-gallon spill on the North Slope a year earlier. There was another spill of 13,500 gallons in 2009.
Last month, government lawyers sought to have BP's probation revoked for the latest spill, meaning the probation period could have been lengthened or the company could have faced additional penalties.
In his ruling, Mr Beistline said the government failed to prove the company committed criminal negligence.
"We are pleased with the decision and appreciate the court's attention," BP spokesman Steve Rinehart said in an email.
"We know that the privilege of working in Alaska comes with a responsibility to maintain high standards. We will continue our commitment to running safe and compliant operations."
Prosecutors said BP's history of environmental crimes in Alaska began in February 2001 when it pleaded guilty to releasing hazardous materials at its Endicott facility on the North Slope.
The company was fined 500,000 US dollars, placed on probation for five years and ordered to create a nationwide environmental management programme, prosecutors said.
The March 2006 spill of 200,000 gallons of crude was caused by corrosion, and BP's leak detection system failed to notice it, they said.