Japan is about to become the latest battleground between two of the world's biggest ride-hailing giants.

Didi Chuxing, China's top ride-hailing company, is teaming up with Japan's SoftBank (SFTBF) to launch taxi-hailing services in cities such as Tokyo and Osaka later this year.

The trial service will connect passengers with Japan's existing taxi operators, Didi and SoftBank said in a statement on Thursday.

The announcement comes less than two months after Uber said it would start a taxi-hailing pilot on Awaji, a small island near Osaka.

Regulations in Japan prevent companies from operating ride-sharing services that use freelance drivers. Instead, all rides have to be provided by licensed taxi companies and passengers cannot share rides.

SoftBank CEO Masayoshi Son slammed those rules while speaking at an annual company event Thursday.

"Ride-sharing is prohibited by law in Japan. I can't believe there is still such a stupid country," he reportedly said.

SoftBank, which has invested in both Didi and Uber, did not immediately respond to a request to confirm Son's comments.

Related: Why SoftBank is investing in Uber -- and its big rivals

Japan's regulations haven't stopped some of its biggest companies from trying to enter the market.

Sony (SNE) announced early this year that it was developing its own ride-hailing app that will use artificial intelligence to match taxis with riders. Toyota (TM), already an investor in Uber, has said it is looking at entering Japan's taxi industry.

For Didi, "the immediate big opportunity is leveraging the big amount of Chinese tourists who travel to Japan," said Xiaofeng Wang, an analyst at research firm Forrester.

Didi is best known for driving Uber out of China two years ago after a costly battle. The company has been pushing aggressively into international markets this year.

Last month, the company announced it was introducing its services in Melbourne, Australia. That followed its launch in Mexico, a major market for Uber. And Didi entered Brazil in January by buying local operator 99.

Uber, meanwhile, has pulled out of some international markets. In March, it sold its operations in eight Southeast Asian countries to Singapore's Grab. At the time, Uber CEO Dara Khosrowshahi said the retreat "puts us in a position to compete with real focus and weight in the core markets where we operate."

-- Sherisse Pham and Yoko Wakatsuki contributed to this report.