Ride-hailing services like Uber will be legal in China as of November, Bloomberg reports, citing a document from the country's transportation ministry. Uber and its Chinese rival, Didi Chuxing, have so far been operating in a legal gray area, as the two companies vie for supremacy in the world's largest ride-hailing market, but the new regulations reviewed by Bloomberg will now allow them to compete freely.

An earlier draft of the regulations called for a ban on the use of private cars for ride-hailing services, and would have limited the number of licenses available for drivers. But the final version is more lenient. According to Bloomberg, the government will encourage growth of the so-called sharing economy, with some restrictions on how ride-hailing companies operate. Drivers must have at least three years of experience, and cars must be equipped with safety features including alarms and GPS. Cars that have been driven for more than 600,000 kilometers (372,822 miles) will have to be retired, and they will not be allowed to have more than seven seats. All data collected by the companies will also have to be stored in China, and will be retained for at least two years.

"this is a welcome step"

Both Uber and Didi Chuxing welcomed the new regulations, though each acknowledged uncertainty around how they will be implemented. Didi expressed some concern over the licensing procedure, which will be handled by local taxi authorities, and it's not clear how the rules will affect part-time drivers.

"While the details of how these regulations are implemented will fall to cities and provinces, this is a welcome step in a country that has consistently shown itself to be forward-thinking when it comes to innovation," Uber China said in a blog post published Thursday. In a statement to TechCrunch, Didi Chuxing said it "welcomes the government’s endorsement and encouragement of the industry and China’s emerging sharing economy."

Didi Chuxing, which raised $7 billion in funding last month and received a $1 billion investment from Apple in May, says it has more than 300 million active users in China, along with 14 million drivers. Uber has not disclosed the size of its user base in China, though it is currently operating in more than 60 cities across the country, and plans to reach 100 cities by the end of the year.

Correction, July 29th, 7AM ET: An earlier version of this article inaccurately reported the mileage limit for approved cars. It is 600,000 miles, not 60,000.