The US army has decommissioned its final Mobile Army Surgical Hospital, a unit made famous in the 1970 film MASH and a long-running TV series.
US ambassador Ryan Crocker presided over the handover
The last MASH was handed over to the Pakistani military in Muzaffarabad to continue treating quake victims there.
MASH units were founded in 1945, but have been replaced with combat support units that get closer to the frontline.
The film and TV series were black comedies on the life and loves of a MASH crew during the Korean War.
The 212th MASH was the last in the US army. It was the first US army hospital to be established in Iraq in 2003 and is the most decorated combat hospital in the army.
Triage 'cake cutting'
The US ambassador to Pakistan, Ryan Crocker, presided over the decommissioning ceremony in Muzaffarabad, in Pakistan-administered Kashmir.
He said: "Today we transfer this MASH unit to Pakistan and in so doing we are celebrating a new dimension in an old alliance and partnership."
The popular US TV series ran until 1983
The Pakistani army is getting a $4.5 million (£2.6m), 84-bed facility.
Pakistani and US medical corps soldiers lined up with their standards as a Pakistani army band played tunes. Senior officers exchanged national flags and the 212th MASH colours were wrapped.
Befitting the irreverent film and TV series, it was then announced there would be a "cake cutting ceremony in the triage section".
The 1970 film was inspired by the novel MASH by former war surgeon Richard Hornberger, under the alias Richard Hooker.
They introduced the characters of cynical doctor Captain "Hawkeye" Pierce (Donald Sutherland) and uptight nurse "Hotlips" Houlihan (Sally Kellerman) who were taken on in the TV series by Alan Alda and Loretta Swit. The TV series ran until 1983.
MASH focused on finding humour amid the horror of war.
Its doctors were not averse to a martini or two from their own still.
But 212th chief doctor Robert Piotrowski admitted there was "a little more military doctrine" these days.
"There's no still here - we're dry. We do have some great coffee - we substitute a coffee pot for gin and we do have tea with the Pakistani Rangers from time to time."
In the Korean War it was said that 97% of wounded soldiers who made it to the MASH survived.
The units have been replaced by the CASH - the combat support hospital that is not as fixed as the MASH and can deploy small surgical squads.