LONDON — He found his young victims on gay dating sites, then drugged, raped and killed them before disposing of their bodies within a third of a mile of his East London apartment.

The man, Stephen Port, who murdered at least four young men over 15 months and raped many more, was sentenced at the Central Criminal Court in London on Friday to life in prison, in a case that has appalled the country with its grisly details and raised serious questions about the quality of policing.

All of Mr. Port’s victims were gay and in their 20s. They all died from overdoses of the date-rape drug GHB, also known as G or liquid ecstasy.

Mr. Port, who came out as gay when he was 26, trawled social media sites like Grindr and Fitlads to find his victims. He lured them to his one-bedroom apartment, where he either spiked their drinks with the drug or injected them with it.