PARIS—French police on Monday detained Uber Technologies Inc.'s top two executives in Paris, French prosecutors said, making good on the government's promise to crack down on the car-hailing service after violent protests by taxi drivers last week.

Investigators for the French police's online-fraud unit are questioning Pierre-Dimitri Gore-Coty, Uber's General Manager for Western Europe, and Thibaud Simphal, Uber's general manager for France, a spokeswoman for the Paris prosecutor's office said Monday.

The two Uber executives are being questioned for alleged violations of a new transportation law in France that bans operating a service like Uber's low-cost offering, Uberpop, which matches passengers with drivers who don't have professional licenses, prosecutors said. The new law makes operating such a system punishable with a fine of as much as €300,000 ($334,971) and two years in prison.

Under French law, individuals can be detained for questioning without preliminary charges for an initial period of up to 24 hours, which can in some cases be renewed. After a detention, a suspect can be let go, or be turned over to an investigating magistrate who can press preliminary charges.

"Two representatives of Uber today went voluntarily to a police hearing that is part of a continuing legal proceeding—they have since been taken into custody," an Uber spokesman said. "Uber is always willing to work with authorities to overcome possible misunderstandings."

The detentions mark a big escalation of the government's campaign against Uber in one its major markets, following a series of taxi protests that snarled roads across France last Thursday. Uber says it has nearly one million regular customers in France, including about 400,000 who use Uberpop.

French officials have since last fall said that Uberpop is illegal, but so far have cracked down mainly on Uberpop drivers, not Uber itself. Prosecutors raided Uber's offices in March to search for evidence in a continuing inquiry, but haven't so far filed charges against Uber or its executives for violations of the new law.

Uber contends the new law that would ban Uberpop itself violates the French constitution and European treaties, and therefore doesn't apply. In a separate court case, Uber is currently challenging the provision before France's constitutional court. The company is also asking the European Union to intercede and block the law.

In the wake of the violent protests against Uber last week that shut down access to both of the main airports in Paris and to train stations, French Interior Minister Bernard Cazeneuve asked police chiefs to issue decrees banning the service. He also asked prosecutors to begin investigating Uber, and to start impounding the cars of Uberpop drivers, rather than simply fining them.

The French Interior Ministry said last week that police have opened cases against 420 drivers, something that can lead to fines or impounding of vehicles. Mr. Cazeneuve said that police would start impounding vehicles every time an Uberpop driver is caught in the act.

"The law is quite straightforward in what it says," Mr. Gore-Coty said in an interview last week. "But we are concerned that there are very serious issues with the law that make it unconstitutional."

Write to Sam Schechner at sam.schechner@wsj.com

Subscribe to WSJ: http://online.wsj.com?mod=djnwires