Taxi-hailing apps Grab and Uber Technologies Inc must partner with a transport business and register their cars by the end of May if they want to go on operating in Southeast Asia's largest economy, a minister said.

Indonesia's new rules on the online ride-hailing apps come two days after thousands of cabbies held a protest rally in the capital, Jakarta, demanding the government ban the two companies.

The rise of ride-hailing apps has sparked protests and legal action around the world from traditional taxi operators, who see the new operators as a threat to their livelihoods.

"Uber, Grab are app companies. If they want (to operate), they have to partner with a transportation business entity, like a car rental company," Transportation Minister Ignasius Jonan told reporters.

Singapore's Grab and U.S.-based Uber said they would abide by the new rules.

"Even before the demonstration, we had started the process to help our drivers form a cooperative unit and meet the requirements," Ridzki Kramadibrata, managing director of Grab Indonesia, told Reuters.

Donny Sutadi, Uber Indonesia's commissioner, told reporters they would partner with a car rental company.

The proliferation of cheap taxis using the ride-hailing apps in frequently gridlocked Jakarta has made the traditional pick-up and drop-off taxi services unprofitable, threatening the business models of the country's top taxi firms.

President Joko Widodo has welcomed the competition provided by the new companies.