HOUSTON — Two years after the immense BP oil spill that killed 11 people and blackened beaches along the Gulf of Mexico, federal prosecutors have filed the first criminal charges related to the accident, accusing a former company engineer of destroying evidence by deleting text messages that discussed the amount of oil leaking from the stricken well.

Federal authorities arrested the engineer, Kurt Mix of Katy, Tex., on Tuesday and charged him with two counts of obstruction of justice in a complaint filed in the Eastern District of Louisiana and unsealed on Tuesday.

However, court documents filed with the charges and Mr. Mix’s relatively low rank within BP suggested that the charges were just the opening salvo in the government’s case against the company and the contractors involved in the explosion of the Deepwater Horizon drilling rig and oil spill on April 20, 2010. The stricken well spewed millions of barrels of oil over months, sickening birds and marine life, idling oil rigs and fishing vessels, and causing economic damages in the billions of dollars.

The long-term effects of the spill are still being assessed, and the government has yet to levy fines against BP for the pollution it caused.