Maj. Gen. Winfield Scott Harpe, commander of the United States 16th Air Force, based in Spain, was killed yesterday while piloting a fighter bomber that crashed during a routine training mission, air force officials said.

The General was flying an F-16 that went down at about 6:45 P.M., Madrid time, near the town of Chiloeches in Guadalajara province, 18 miles northeast of Torrejon Air Base, headquarters of the 16th Air Force, according to Sgt. Kenneth Fidler, an Air Force spokesman reached by telephone at the base.

Sergeant Fidler said the body of the 53-year-old general was found near the crash site. The plane belonged to the 401st Tactical Fighter Wing based at Torrejon. The cause of the crash was not immediately known. There were no reports of any other deaths or injuries.

Just last week the United States and Spain signed an agreement in Madrid that called for the 401st Tactical Wing to leave Torrejon by 1990 and move to an airbase in Crotone, Italy.

General Harpe, who was born Jan. 12, 1937, in Thomaston, Ga., was named commander of the 16th Air Force in July 1987.