Walmart Inc. has decided to sell its Japanese supermarket unit Seiyu GK amid fierce competition from online retailers, sources close to the matter said Thursday.

The U.S. retail giant is in talks about a deal with some Japanese retailers and some investment funds, the sources said, adding that the sale price for Seiyu is set for 300 billion to 500 billion yen ($4.45 billion)

Its decision to withdraw from the Japanese market comes at a time when it is shifting its investment to digital retailing in the face of competition from major e-commerce operators such as Amazon.com Inc.

Limited growth potential in Japan on the back of the country's aging and declining population also apparently prompted Walmart to leave the world's third-largest economy.

But finding a buyer could be difficult. Not only are many of Seiyu's 335 outlets old, but its rivals have also been struggling, making a purchase of the whole business unlikely, and restructuring of the troubled retailer, such as through job cuts and the closure of unprofitable stores, may be unavoidable, industry observers said.

Walmart forged a capital tie-up with then struggling supermarket operator Seiyu Ltd. in 2002 and made the Tokyo-based firm a wholly owned unit in 2008.

But Seiyu's performance did not improve and the supermarket chain operator was delisted from the Tokyo Stock Exchange in 2008.

In the face of difficulties, Seiyu closed three more outlets in the first three months of this year, after shutting 27 outlets in 2015, six in 2016 and three in 2017.

In recent years, Japanese department stores and all kinds of smaller shops have faced severe competition from online retailers, which are more flexible in responding to consumer demand and often sell items at lower prices.

In Japan, however, e-commerce still accounts for about 5.8 percent of sales, according to the industry ministry, and there is a huge potential for growth.

Walmart has been stepping up efforts to strengthen its online operations. In May, it announced the acquisition of India's major online store Flipkart.