NEW DELHI — It was an inauspicious moment for a military the United States is banking on to help keep an expanding China in check.

An Indian Air Force pilot found himself in a dogfight last week with a warplane from the Pakistani Air Force, and ended up a prisoner behind enemy lines for a brief time.

The pilot made it home in one piece, however bruised and shaken, but the plane, an aging Soviet-era MiG-21, was less lucky.

[Read about how tensions have affected an American cricket team with players from both countries.]

The aerial clash, the first by the South Asian rivals in nearly five decades, was a rare test for the Indian military — and it left observers a bit dumbfounded. While the challenges faced by the India’s armed forces are no secret, its loss of a plane last week to a country whose military is about half the size and receives a quarter of the funding was still telling.