BARCELONA, Spain -- An F-18 fighter jet crashed at an air base in the Spanish city of Zaragoza, but the pilot ejected successfully, the Spanish Defense Ministry said Saturday.
The aircraft landed within the perimeter of the base, the Defense Ministry said on Twitter.
The base, which lies about 10 miles outside the city, belongs to the Spanish Air and Space Force.
Videos posted on social media showed a plane in flames falling toward the ground.
The air force said several hours after the crash that the pilot was "recovering favorably" but would remain in the hospital under observation for "a few days."
Spain's public news agency EFE said the F-18 was training for a flying exhibition when the incident occurred.
The Guardia Civil told The Associated Press that one of its patrols was the first to reach the pilot, who fell outside the exterior fence surrounding the air base.
According to the Guardia Civil, the pilot suffered injuries to his legs, apparently because he ejected with a parachute from a low altitude. He was evacuated to hospital in a helicopter.
The Guardia Civil said it would collaborate with the military in investigating the crash. It said that the initial information provided by the pilot was that the plane had apparently suffered a malfunction.
The American-made F-18 Hornet has formed a part of the air defenses of the United States since the 1980s and has been purchased by the air forces of several allied countries.
Spain's air force acquired its first 72 models of the F-18 manufactured by McDonnell Douglas in 1983. The fighters, known for their versatility, entered service three years later. Spain's air force later purchased an unspecified number of additional F-18s.
The Zaragoza base is home to a unit of Spain's F-18s.
Spain's Defense Ministry did not immediately respond to questions by the AP about incident.