It was a hot mess — so much so that when the pilot of an international flight spilled a cup of coffee on the cockpit controls midway over the Atlantic Ocean, it melted one of the buttons and the plane was diverted to Ireland, an investigation concluded on Thursday.

The Condor airlines flight had been carrying 337 people, including 11 crew members, from Frankfurt to Cancún, Mexico, when the episode occurred aboard the Airbus A330, according to the United Kingdom’s aviation authority.

The coffee was on a tray table in the cockpit when the pilot accidentally knocked it over, spilling most of it onto his lap and some of it onto the communications equipment, investigators said.

No one was injured in the Feb. 6 episode, during which the pilot’s and co-pilot’s audio control panels were both disabled by the spill and there was a small amount of smoke in the cockpit, the Air Accidents Investigation Branch said. The failure of the two audio control panels caused “significant communication difficulty” for the flight crew, investigators said.