After two female passengers alleged that he prevented them from leaving his car, an Uber driver was charged with unlawful restraint and reckless endangerment, West Chester police said.

The women were “visibly upset” when they flagged down an officer in the 300 block of Fassnaught Alley at 2:45 a.m. Friday, police said.

The Uber driver had “deviated from the route of travel and repeatedly locked all of the doors as the victims attempted to free themselves from the moving vehicle,” police said.

Police arrested Zacharias Georgalis, 33, of Upper Darby Township after the women pointed out his car nearby in an alley, officials said.

After he was charged and arraigned, Georgalis was remanded to Chester County Prison. Bail was set at $20,000.