A powerful bomb exploded this morning in Ramstein, West Germany, outside the headquarters of U.S. and NATO European Air Force operations, injuring 20 people including two senior officers and causing extensive damage to the building, U.S. officials said.

The explosion occurred in a parking lot at Ramstein Air Base, about 70 miles southwest of Frankfurt, shortly after 7 a.m., just before most of the headquarters staff was scheduled to arrive for work.

U.S. officials said this evening that no one had claimed responsibility for the blast. But the circumstances of the attack resembled one by left-wing West German terrorists in 1972 against the U.S. Army headquarters in Heidelberg. On the suspicion that terrorists may again have been involved, the West German Office for Criminal Activity joined U.S. officials in investigating the case.

Two seriously injured U.S. Air Force officers -- Brig. Gen. Joseph D. Moore, assistant deputy chief-of-staff for operations, and Lt. Col. Douglas R. Young, an operations officer -- were flown by helicopter to a military hospital in Landstuhl, a few miles from Ramstein, where their condition was reported as stable.

Ten other U.S. Air Force personnel and two West German civilians also were treated in Landstuhl, a U.S. statement said. The other victims suffered mostly cuts and were released after treatment on the base. The Air Force said all but one of the injured Americans were officers.

Col. Ralph Wetzl, a senior base commander, told reporters that neither the type of explosive device used nor its exact location had been determined by investigators. But correspondents at Ramstein reported that explosives experts were focusing their search on the debris of an almost destroyed vehicle, believed to have been a Volkswagen.

The blast severely damaged other cars in the lot and pounded the four-story, L-shaped joint headquarters building, shattering windows, blowing down interior walls and smashing equipment and furniture, according to the official statement.

As a precautionary measure, U.S. officials closed the base to all nonduty personnel today. But Air Force spokesmen said American and NATO flying operations had not been affected by the explosion.

Ramstein, home of the 86th Tactical Fighter Wing, has a staff of 7,000 Americans and about 3,000 West Germans, Dutch, Canadians and British.

Today's blast was the third violent attack this year on a U.S. facility in West Germany. Two previous incidents occurred in March.

One was an explosion outside a building in Giessen thought to belong to U.S. intelligence services. A day later, unknown assailants tossed three molotov cocktails at a U.S. military building in Frankfurt. No injuries were reported in either blast but damages totaled about $50,000.

Letters claiming responsibility for the attacks linked the incidents with supporters of jailed members of the extreme left-wing West German Red Army Faction who were staging a hunger strike at the time for improved prison conditions and the chance to be grouped together.

In April a nine-pound bomb was discovered and defused at a military community center on the U.S. Air Force base in Wiesbaden the day one of the jailed leftists died. The hunger strike has since ended.

During the past decade, there have been sporadic attacks on other U.S. military installations, including a building under construction in Garlstedt in 1978, a tank depot in Giessen in 1977 and an officers club at Rhein-Main Air Base in Frankfurt.

In 1972, four U.S. soldiers died in bomb attacks on a U.S. Army base in Frankfurt and U.S. Army headquarters in Heidelberg, for which the Red Army Faction claimed responsibility, saying it was protesting the war in Vietnam.

U.S. military authorities provided the following list of those hospitalized or treated at a hospital. Few hometowns were available:

Hospitalized in stable condition:

Brig. Gen. Moore, Myrtle Beach, N.C.; Lt. Col. Young, Glendale, Ariz.

Treated and released from the hospital:

Col. Philip D. Carlson, Lt. Col. Ronald H. Lynde, Sgt. Wilson R. Evans II, Lt. Col. Richard A. Myers, Capt. Marlin W. Yankee, Maj. John G. Whitcomb, Maj. Henry Fiumara, Maj. Robert Introne, Maj. Charles V. Tookey and Lt. Robert Batterman.

West German employes of the Air Force injured but released from the hospital:

Peter Hartmann and Heidi Lill.

Others were treated at the scene of the explosion by U.S. medical personnel. Their names were not immediately provided.