The German government on Tuesday said it planned to buy four to six Lockheed Martin Corp. C-130J troop transport planes after repeated delays in the delivery of the larger A400M military cargo aircraft built by Airbus Group SE.

German Defense Minister Ursula von der Leyern signed a declaration of intent in Paris to pool the yet-to-be-acquired Lockheed Martin military transport planes with the same type operated by France, a German defense ministry spokesman said. The French government earlier this year signed a deal to buy the Lockheed plane operated also by the U.S. Air Force and a large number of other military forces.

The C-130J purchase should give the German air force certainty that it will have the ability to provide airlift in crisis situations, the spokesman said. The German air force's fleet of Transall cargo planes is aging and in need of replacement.

The French and German defense ministries have been anchor members of a consortium of seven countries backing the development and production of Airbus's A400M military cargo plane. The project has suffered repeated technical problems and schedule delays, spurring interest among the two countries to buy extra cargo planes.

Airbus earnings have been hit numerous times as costs of the A400M program have increased. The Toulouse, France-based plane maker in July booked a 1 billion euro ($1.12 billion) charge against earnings because of the latest problems with the plane linked to an engine component. The plane maker warned more charges may lie ahead as it compensates air forces for delayed planes.

The German decision to buy Lockheed's plane would not lead to a reduction in the number of A400Ms Berlin plans to buy, the defense ministry spokesman said. The German military, which now operates five A400Ms, has said it would buy 53 of the Airbus planes, though it plans to sell 13 of those on to others.

German officials are still figuring out exactly how many of the U.S. planes they will acquire and when they can be introduced into service with the Luftwaffe.

Write to Robert Wall at robert.wall@wsj.com