Chinese ride-hailing firm Didi Chuxing has been given a permit to test self-driving cars in California.

The company is allowed to test autonomous vehicles in the state as of May 10, according to the California Department of Motor Vehicles' website.

Didi was not immediately available for comment when contacted by CNBC.

Didi, which bought out Uber's Chinese unit in 2016, is one of a number of Chinese firms looking to gain an edge over Silicon Valley tech giants.

Internet firm Baidu obtained its own permit to test driverless cars in California in 2016. It also established a research center in San Francisco to boost its artificial intelligence efforts.

Alibaba and Tencent have also been reported to have their own plans to test autonomous cars.

But the big ambitions of tech giants to launch driverless cars are being tested by high-profile crashes involving the vehicles.

Uber's self-driving tests were suspended earlier this year following a deadly crash in Arizona involving an autonomous vehicle and a pedestrian.

Controversy has also faced electric automaker Tesla following a number of crashes involving its self-driving cars. Last week, two teenagers were killed and a third injured after a crash involving one of Tesla's Model S cars in Florida.