US retail company Costco Wholesale Corporation, or simply Costco, was reportedly forced to close its first-ever store in China during its opening day on Tuesday this week.

The opening of the hypermarket operator's pilot store in China attracted thousands of people who flocked to its doors on its opening day, causing chaos and massive traffic jams in neighboring streets.

A number of videos posted online by people who visited the opening showed thousands of people standing in line at the store's aisles during its opening day. Hundreds of people apparently had to wait hours before they could get to the checkout counter.

The massive parking area of the store, which is located in Shanghai's Minhang district, was also jam-packed with cars. Some people reportedly gave up as most had to wait an average of three hours before they were able to park their vehicles.

Costco had to post signs outside of the store to warn visitors that they had to wait a few hours before they could get in.

Nearby office buildings and establishments also experienced foot and vehicle traffic problems due to the influx of visitors to the newly opened hypermarket.

A school that was located nearby sent out an advisory to its student's parents, warning them of the almost standstill traffic conditions. The message mentioned that the grand opening of the new Costco Supermarket has forced them to delay the dismissal of their students.

 According to local media reports, Costco employees were forced to close the store early due to a request by the local district government. The store shut its doors down around 2:45 pm.

Government officials reportedly called the store and requested that it temporarily close early due to the extremely large crowd. The chaos had apparently become a public safety concern.

Local government officials mentioned to local media outlets that it was requesting consumers to shop during off-peak hours and to act in a rational manner amid the chaos.

Last month, Costco officially announced that it was going to be opening its first store in China. The company has been present in China since 2014, but only through an online store on Alibaba's Tmall online marketplace.

Costco currently has more than 776 stores around the world, with 539 of them located in the United States. The company's other stores are located in countries such as Canada, Mexico, the UK, Japan, South Korea, Taiwan, Australia, Spain, Iceland, and France.

Costco's foray into the Chinese market comes as other major US retailers have exited the country. Amazon, Carrefour, and Tesco have all retreated from China after apparently failing to significantly penetrate the market due to stiff competition from local players.