Walmart has forged another alliance to counter Amazon, partnering with Japan’s Rakuten to sell e-books in the US and improve its online grocery business in the Asian nation.

The collaboration will bring Rakuten’s Kobo device and e-book catalogue to Walmart’s US stores later this year, the companies said in a statement on Thursday. The partnership also includes a revamp of Walmart’s online grocery service in Japan that will roll out in the third quarter. Rakuten shares rose as much as 4.9 per cent at midday in Tokyo.

The alliance with Rakuten, the so-called Amazon of Japan, is Walmart’s latest step to team up with technology companies that can help it battle the Seattle e-commerce giant.

Last year, it aligned with Google to let shoppers order by voice over Google Home devices. It is also working with Uber to deliver groceries in some cities.

“We are excited to collaborate with the top online shopping destination in Japan,” Walmart chief executive Doug McMillon said in a statement.

About one in four online purchases in Japan take place using Rakuten's marketplace, Ichiba, and the company has expanded into sports, credit cards and family planning.

But the 21-year-old company is relatively unknown outside its home market, leading its chief executive Hiroshi Mikitani to make investments abroad, including a $1bn deal for online coupon service Ebates and a stake in ride-sharing service Lyft.

For Kobo, the partnership could offer another shot at the US market. Founded in Canada, the e-book company initially entered the US through a partnership with Borders. That ended unceremoniously when the book chain went bankrupt in 2011, forcing Kobo to sell through its own website and a few hundred independent book stores. Soon after, Rakuten bought Kobo for $315m. The business currently has 30 million readers globally.

Walmart will become the exclusive retailer of the Kobo brand in the US, and will begin offering Kobo’s nearly six million eBook and audio book titles later this year. The retailer will also sell digital book cards in stores, enabling them to carry a broader selection of titles. The two companies will introduce a co-branded app to access e-book content. A spokeswoman for Walmart declined to say at what price it would offer e-readers and e-books.

The US e-books market has slowed, with net revenue declining 5.3 per cent from January to August last year, according to the Association of American Publishers. It is also becoming a crowded market, with Apple working on a redesigned version of its own e-book reading application.

Amazon has fought a slump in tablet sales by introducing lower-cost versions, extending battery life and adding its voice-activated digital assistant Alexa to read books aloud. Amazon ranks third in global tablet sales behind Apple and Samsung, according to industry researcher IDC.

The new online grocery delivery service, dubbed “Rakuten Seiyu Netsuper,” aims to be more convenient for shoppers and to offer more items such as meal kits and cut vegetables. It will also boost capacity by opening a dedicated grocery fulfilment centre this year, the companies said.

Walmart entered Japan in 2002 with a small stake in Seiyu, and took majority control in 2005. Despite a sluggish performance, Walmart has remained in Japan, even as other global retailers like Carrefour and Tesco have pulled out.