U.S. retailer Costco was forced to cut short the opening day of its inaugural mainland China outlet over safety worries Tuesday after huge crowds of bargain-hunters swamped the store in suburban Shanghai.

The massive warehouse outlet issued a notice to users of its official app in the early afternoon saying that it would no longer allow more customers through the doors, citing an "overcrowding" situation inside the store and traffic chaos in surrounding areas.

Earlier in the day, an AFP journalist observing the store's opening witnessed frantic scenes as thousands of shoppers jostled to get their hands on everything from fresh meat to big-screen TVs and giant teddy bears.

"Due to overcrowding in the market, and in order to provide you with a better shopping experience, Costco will temporarily close on the afternoon of August 27. Please avoid coming," the notification said.

In a text message to AFP, a spokesman for Costco said the doors were shut to new incoming customers but that those inside would be allowed to finish shopping.

Analysts have warned Costco's model may struggle in a market that has been tough on foreign food retailers but shoppers descended on the outlet in droves as soon as the doors opened, prompting staff to move them into the store in phased groups to maintain order.

But they continued to flow in, leading to shopping cart gridlock throughout the store, especially in more popular areas such as the food section, where people scrambled to get their hands on meat and other produce.

Elsewhere, shoppers pushed and shoved for access to the freshly cooked rotisserie chickens as staff pleaded with buyers to form a line.

Outside, motorists complained on social media about three-hour waits to get into the store's parking lot, while others stood for lengthy periods in 36-degree (97 fahrenheit) heat outside the store hoping to get in.

But there were no immediate reports of any injuries or scuffles.

The spokesman said the store, which sprawls out over 1.4 hectares (150,000 square feet) in Shanghai's southwestern suburbs, planned to open as normal on Wednesday.

Foreign "hyper-markets" have struggled in China, with some criticised for failing to cater to the country's consumer habits.

In June, French chain Carrefour agreed to sell 80 percent of its China business to domestic retailer Suning after suffering recurring losses.

German wholesaler Metro is in the process of selling its operations to a local bidder and Britain's Tesco pulled out of the Chinese market in 2014.

Costco also faces stiff competition from online shopping options provided by the likes of e-commerce giant Alibaba, which have proven hugely popular.

But Costco already has had an online presence in China for five years.

Richard Zhang, Costco's senior vice president for Asia, told AFP last week that data gleaned from those online sales convinced the retailer that Chinese consumers were now ready for a bricks-and-mortar version.