The US Navy has launched a ship named after gay rights activist Harvey Milk, who was forced to resign from the service in the 1950s because of his sexuality.

Milk later became one of America’s first openly gay politicians, elected in 1977 to the San Francisco Board of Supervisors – but was shot and killed a year later by former city supervisor Dan White, with whom he had frequently clashed.

In the 1950s, Milk served as a diving officer and Lieutenant aboard the submarine rescue ship USS Kittiwake during the Korean War, but was forced out of the service following two weeks of interrogation about his sexuality in 1955.

Speaking at the launch of the USNS Harvey Milk in San Diego on Saturday, Navy Secretary Carlos Del Toro said that it had been wrong that Milk had been forced to ‘mask that very important part of his life’ during his time in the navy.

‘For far too long, sailors like Lt. Milk were forced into the shadows or, worse yet, forced out of our beloved Navy,’ Del Toro said. ‘That injustice is part of our Navy history, but so is the perseverance of all who continue to serve in the face of injustice.’

According to the BBC, when Barack Obama’s administration first announced its intention to name a ship after Milk in 2016, some expressed opposition to the move, suggesting that Milk would have disapproved of lending his name to a naval vessel, given his well-known opposition to the Vietnam War.

Sea Penn played Milk in the eponymous biographical film of 2008.