BEIRUT—A driver working for Uber Technologies Inc. in Lebanon has been arrested for the killing of a British diplomat over the weekend, local security officials said Monday, at a time when the safety of people who use ride-hailing services has been drawing close attention.

Rebecca Dykes’ body was found Saturday lying on the side of a major highway just north of the country’s capital, Beirut, according to Lebanese security officials. Ms. Dykes had been assaulted and raped, according to a preliminary autopsy, the officials said. They said she was found with a rope tied around her neck.

“We are devastated by the loss of our beloved Rebecca. We are doing all we can to understand what happened,” Ms. Dykes’ family said in a statement Sunday.

Lebanon’s Internal Security Forces arrested the suspect early Monday morning, a Lebanese official said, adding that the suspect had confessed to the crime during questioning.

An Uber representative on Monday confirmed that the suspect worked for the company and said it was cooperating with Lebanese officials investigating the killing. “We are horrified by this senseless act of violence,” the spokeswoman said. “Our hearts are with the victim and her family. We are working with authorities to assist their investigation in any way we can.”