BALTIMORE — In a 14-hour operation, a young military veteran whose genitals were blown off by a bomb received an extraordinary transplant: a penis, scrotum and portion of the abdominal wall, taken from a deceased organ donor.

The surgery, performed last month at Johns Hopkins Hospital, was the most complex and extensive penis transplant to date, and the first performed on a combat veteran maimed by a blast.

Two other successful penis transplants have been performed — in South Africa in 2014 and at the Massachusetts General Hospital in 2016 — but they involved only the organ itself, not the scrotum or surrounding flesh. This latest operation transplanted a single piece of tissue that measured 10 inches by 11 inches and weighed four or five pounds.

This is an evolving branch of medicine spurred in large part by the wounds of war — particularly the blast injuries from improvised explosive devices, or I.E.D.s. The medical teams in Baltimore and Boston have spent years preparing for the surgery, practicing on cadavers and refining their techniques.