Shanghai slapped new rules on smartphone apps used to hail rides on Thursday, a major setback for tech firms hoping to capitalize on the booming trend.

The regulations issued by the city government ban the use of taxi apps during the morning and evening rush hours. Regulators said the changes were necessary because the apps had affected the "fairness of the taxi industry."

In an even more restrictive ruling, the use of apps to summon private cars was banned outright -- a ruling that could affect U.S.-based Uber.

Uber officially launched its service in Shanghai just two weeks ago, although the company had previously operated a pilot program in China's commercial capital.

Unlike some other popular apps, which are used to summon taxis, Uber contracts with private car services.

An Uber spokesman declined to comment Thursday when asked about the new regulations.

Related story: Uber rival accuses car service of dirty tactics

The company has already experienced growing pains in Shanghai. Uber was forced to drop prices to attract more users during the pilot program.

The company is placing a big bet on China. Operating in Asia for only a year, Uber has been building and testing its service in cities including Shenzhen and Guangzhou. It's also hiring in the Chinese cities of Chengdu, Hangzhou and Nanjing.

Related story: Uber 'price gouging' complaints are silly

Competition in the country is already fierce, with some of the country's biggest tech companies hoping to grab a slice of the market.

Tencent has plowed millions into an app called Didi Dache, which is integrated with its powerful mobile payment platform. Another service called Kuaidi Dache is backed by Alibaba.

A regulatory fight will be nothing new for Uber. The service has fought against restrictions in the United States and across Europe, with mixed results.