<WC1>SAN FRANCISCO ? The Petaluma pilot at the helm of the cargo ship that caused a massive oil spill in the San Francisco Bay pleaded guilty Friday to two environmental crimes.

Capt. John Cota entered his plea to the illegal discharge of oil and killing birds in San Francisco. federal court.

Cota?s attorney said the pilot faces at much as 10 months in prison.

The 900-foot Cosco Busan slammed into the San Francisco-Oakland Bay Bridge in heavy fog on Nov. 7, 2007 and spilled 54,000 gallons of oil that killed and injured thousands of birds.

The National Transportation Safety Board said last month that Cota?s prescription medications impaired his performance, but it also blamed other factors for the crash including a poorly trained crew.