Pakistan released a captured Indian fighter pilot on Friday, aiming to end a cycle of retaliatory attacks that brought the nuclear-armed foes close to war and could set a precedent for future clashes.

Wing Cmdr. Abhinandan Varthaman was released at the border and walked into India in a dramatic evening handover that was broadcast on television in both countries. His release lowered the immediate tensions caused by several days of back-and-forth airstrikes and his capture.

“Welcome...