Tokyo's Haneda airport held a 10-day experiment in January with a self-driving prototype minibus

Stuck in traffic on a Japanese highway? If you're in a self-driving car you might be able to kick back with a sandwich and check your phone under new legislation in the country.

The law, passed Tuesday and published on the lower house website, takes effect from next year ahead of the Tokyo Olympics and offers a slight loosening of the current restrictions on .

There were few immediate official details about the new rules, but Jiji Press agency said it would come into effect in May and would apply only to limited circumstances, including on a highway.

It would allow drivers in those situations to use a smartphone behind the wheel as their vehicle drives itself, so long as they are able to switch to manual driving immediately in case of emergency, the agency said.

There is no specific language in either existing Japanese legislation or the new law that bans reading, using a laptop or eating while driving, meaning drivers of autonomous cars could sit back with a book and their lunch if they found themselves snarled in traffic.

While the eases restrictions, it still leaves Japan behind some other countries, where autonomous ride-share vehicles have been operating in limited areas.

Self-driving cars are a key sector for development in the auto industry, but there have been recent setbacks, including several accidents last year.

In 2018, Uber temporarily suspended its autonomous ridesharing programme after a crash that killed a woman in the US state of Arizona. It later restarted the programme, but with a driver behind the wheel at all times.

In the same year, Japanese car giant Toyota said it would pump about $500 million into Uber as part of a deal to work together on mass-producing self-driving vehicles.

And in January, six Japanese firms, including national carrier ANA, jointly held a 10-day experiment with a self-driving prototype minibus at Tokyo's Haneda airport.

The holds a maximum of 10 people and cruises along a route connecting two terminals at a speed of up to 30 kilometres (19 miles) per hour using GPS and magnetic markers on the road.

Japan is hoping the 2020 Games will be a chance to showcase cutting edge tech projects in the country, but autonomous transport is also an important sector for a nation suffering labour shortages and a shrinking, ageing population.