A U.S. Air Force F-16 fighter jet crashed in southern Germany on Tuesday, the military said. The pilot ejected safely.

The crash happened near Bayreuth, in Bavaria. The plane had taken off from the Spangdahlem air base, in western Germany, for a training flight near the Grafenwoehr base.

The pilot jettisoned fuel tanks over an unpopulated area before the crash, the 52nd Fighter Wing at Spangdahlem said in a statement. He was being treated at a local hospital, it added.

The cause of the accident was under investigation. The 52nd Fighter Wing said it canceled flying operations for 24 hours for safety reasons.