The two-seat F-16 jet "lost power" as it took off from the base near the southeastern city of Albacete and crashed into an area where other planes were parked, damaging five other aircraft, the defence ministry said in a statement.
Television footage showed flames and thick black smoke billowing from the crash site, as sirens wailed in the background.
"It appears that there are two people who died and who have Greek nationality and eight French," Spanish Prime Minister Mariano Rajoy said in an interview with private television channel Telecinco.
The two Greek pilots of the crashed plane, both of them captains, are among the dead, the defence ministry said.
The French victims include three captains and a lieutenant.
A further 21 people were injured in the accident -- 11 Italian nationals and 10 French, the ministry added.
Five of the injured suffered major burns and were taken to a specialist unit at a Madrid hospital.
The others suffered different bodily injuries. Three have already been released with the rest under observation.
The Spanish ministry said it took firefighters an hour to put out the fire caused by the jet crash.
The French presidency confirmed the eight deaths and said another six French mechanics had suffered serious burns.
French President Francois Hollande "expressed his deep respect for the commitment" of the airmen who were preparing for air force missions to fight "against terrorist groups" in Iraq and the African Sahel region.
France's defence ministry said one of those injured was in a "very serious condition" while another two had been placed in a medically induced coma.
Spain's Defence Minister Pedro Morenes and the chief of staff of Spain's airforce, Francisco Javier Garcia Arnaiz, arrived late Monday at the airbase, located about 250 kilometres (150 miles) southeast of Madrid.
French Defence Minister Jean-Yves Le Drian was expected to visit the site of the accident on Tuesday.
'Tragedy for NATO family'
The Spanish ministry said an investigation had been opened to determine the cause of the accident.
The jet that crashed was taking part in a NATO training exercise called the Tactical Leadership Programme which seeks to improve multi-national cooperation in air operations.
NATO Secretary General Jens Stoltenberg said he was "deeply saddened" by the disaster.
"This is a tragedy which affects the whole NATO family. I express my heartfelt condolences to the loved ones and the nations of those who lost their lives, and I wish a speedy recovery to the injured," he said in a statement.
Britain, Germany, the United States and Spain were also taking part in the exercises at the base but none of their nationals were injured.
The Tactical Leadership Programme was formed in 1978 by NATO's Central Region air forces to advance their tactical capabilities and produce tactics, techniques and procedures that improve multi-national air operations.
The 10 NATO countries that take part in the programme are Belgium, Britain, Denmark, France, Germany, Greece, Italy, the Netherlands, Spain and the United States.
According to the French defence ministry's website, it is "the most renowned and most demanding" programme for fighter pilots.
Rajoy expressed his condolences in a Twitter message, saying he was "moved" by the accident.
The base has housed the training centre for NATO pilots since 2010, according to its website.
"It's a school for pilots, which is home to 10 nationalities," the Spanish defence ministry said.
Get Breaking news, live coverage, and Latest News from India and around the world on NDTV.com. Catch all the Live TV action on NDTV 24x7 and NDTV India. Like us on Facebook or follow us on Twitter and Instagram for latest news and live news updates.