That's the kind of scenario Safr wants to avoid with a service aimed at attracting female riders and drivers.

The idea for the company came when an Uber driver had a scary ride one night with an erratic male passenger. The driver wondered how he would handle the situation if he was a woman.

Recent sexual harassment allegations — and past incidents of sexual assault by drivers — have presented challenges for companies like Uber. Meanwhile, Safr (previously called Chariot for Women) has launched with hopes of opening up the industry to more women.

Safr officially hit Boston streets in the last couple of weeks and aims to make ride-hailing safe for women.

"We want to make sure that women feel safe any time of the day or night as a rider and as a driver."

On a recent Sunday afternoon, about 20 drivers — all women — gathered at a local restaurant for a company training session. They discussed driving tips and safety. And many shared their personal stories.

Danielle Maree Langley told the group about the night she picked up two men when she was a driver for another company.

"One of them kept on really getting in my face, and he didn’t understand [and said,] 'Why don’t you want to come home with me?' " Langley said.

The 35-year-old jewelry designer managed to stay calm and tried to change the subject. But the guy just got more menacing. He even tried to distract her while she was driving, she said.

"I mean I was so scared," Langley said as she got choked up and paused before continuing on. "And these two men said they were firefighters. So, I said, 'If you’re such great firefighters then I will drop you off at the police station, and the police will take you home.' "

And she did.

The other women cheered Langley's quick-thinking in that situation. Her experience resonated with many women in the room. Several drive for other ride-hailing companies. They say driving allows them to set their own hours and earn extra money outside their other jobs. But many of the women say they won’t drive at certain times to avoid uncomfortable situations.

Safr CEO Syed Gilani said his company's goal is to change that.

"We want to make sure that women feel safe any time of the day or night as a rider and as a driver," Gilani said. "And in the end, they feel empowered and new women join the ride-sharing market."

Safr works like other ride-hailing companies. There’s an app that you use to summon a ride. But if you run into trouble, Safr has a feature that will dial 911, your emergency contacts or the company's call center at the push of a button.

Riders can expect to pay a little more for Safr — around a dollar more than other ride-hailing companies, according to the company's marketing and PR manager Joanna Humphrey Flynn.

Safr, a ride-hailing service geared towards women, has officially launched in Boston. The company said it wants to create a ride-hailing option with mostly women riders and drivers. (Jesse Costa/WBUR)

Tracey Ozel, 51, said she likes having another option. When she's not teaching, she drives for Uber and Lyft and signed on to drive for Safr too.

"Lots of women ask me, 'What is it like to drive?' And what they’re really asking is, 'Are you afraid of picking up strangers in the car?' And I'm like, 'I’m totally used to it now,' " Ozel said with a smile during a Safr ride through Boston on a chilly Friday afternoon.

But she said more of her female passengers have expressed a desire to ride with female drivers.

"It'll be more of a niche market, but there’s definitely a market out there for it," Ozel said.

Other drivers say they've had men inquire about getting a female driver for their daughters and wives, in hopes of connecting them with a ride-hailing option that they might find more comfortable.

Safr's launch this month comes after a stream of bad news for Uber — the nation's largest ride-hailing company. It faced an online boycott and a female employee went public with claims about sexual harassment.

Gilani said safety is his company's priority. Riders and drivers are assigned colors and must verify their colors with each other before a trip can start. That way there's no mix up — and riders get in the right car. The company also conducts numerous background checks on drivers (including those outlined under state law) and face-to-face meetings.

"Ours is [a] more in-person, intimate kind of a process that we are creating so we can find out if the person is really what he or she is saying," Gilani said.

Safr had planned to offer a service exclusive to women, but that raised legal questions. The company says it doesn't want to discriminate against men so men can sign up to be drivers or passengers too.

Gilani said the Boston startup just wants to offer a ride-hailing option that's majority women — and women will be its core focus.

"We want 99 percent drivers on our side as women," Gilani said.

Right now the ride-hailing industry doesn’t have many women on the driver side. Most Uber and Lyft drivers are men. About 14 percent of Uber drivers are women, according to a 2015 report released by the company. And a recent survey found women make up about 20 percent of Lyft drivers.

Safr currently has about 100 drivers on the road with another 1,000 being processed, according to Flynn, the marketing manager. All of the drivers are women. The company also said no men have completed applications to be drivers. But there are men who have signed up for the app.

The company aims to take its service to other cities and around the world — particularly to developing countries where women need more access to jobs.