In a scene in the 1982 film "Star Trek II: The Wrath of Khan" Admiral James T. Kirk (William Shatner) leads the emotional memorial service for Captain Spock (Leonard Nimoy) aboard the Starship Enterprise. After Admiral Kirk speaks of his fallen comrade, bagpipes being used by Scotty (James Doohan) play the classic hymn "Amazing Grace" as Spock's coffin is launched into space on a course selected by Saavik, a Vulcan Starfleet officer who, in the mid-2280s, served aboard both the USS Enterprise. Kirk and crew later set course for Earth, awaiting adventures unknown. This is said to be one of the most moving scenes in all the "Star Trek" movies and TV series.

"Star Trek II: The Wrath of Khan", directed by Nicholas Meyer, is a story where on routine training maneuvers, Admiral James T. Kirk seems resigned that he may be on his last space mission assignment of his career. But an adversary from the past has returned with a vengeance. Aided by his exiled band of genetic supermen, Khan (Ricardo Montalban)—brilliant renegade of 20th century Earth—has raided Space Station Regula One, stolen the top-secret device called Project Genesis, wrested control of another Federation starship, and now schemes to set a most deadly trap for his old enemy Kirk. Khan is threating a universal Armageddon; it must be stopped.

More Info: memory-beta.fandom.com