The usually spotless shop windows of the sprawling Apple flagship store in the heart of Beijing were left covered in egg yolk on Friday, after Apple halted sales of its new iPhone 4S in the Chinese capital citing security fears triggered by the turnout of a huge and unruly crowd.

Hundreds of customers – joined by organised groups of scalpers – lined up for two days outside the Apple store braving freezing temperatures, to be the first to snap up the limited 4S phones going on sale.

Before the 7 am launch on Friday, scuffles broke out, witnesses said, echoing the chaotic release of the iPhone 4 last year, which saw clashes between customers and staff that left a shattered glass door in front of the store.

Friday’s scuffles were reported to have taken place between rival gangs of scalpers, who have emerged as key conduits for much of Apple’s lucrative business in China. Apple restricted sales of the phone to two per customer in Beijing and Shanghai, but scalpers have turned out in large groups in both cities to circumvent the restrictions.

Apple's restricted sales have led to its launches becoming chaotic events, often preceded by a week-long media circus and huge turnouts.

After Apple decided not to go ahead with the opening because of the huge crowd and safety fears, a mini-riot erupted, with customers and scalpers pelting the store with eggs. Dozens of police were deployed around the store on Friday morning, sealing off its entrance.

“We were unable to open our store at Sanlitun [in Beijing] due to the large crowd, and to ensure the safety of our customers and employees, the iPhone will not be available in our retail stores in Beijing and Shanghai for the time being,” Apple spokeswoman Carolyn Wu was quoted as saying by the Associated Press.

She said the iPhone would be sold through the online store, authorised resellers and its local carrier, China Unicom. Apple's five stores in China – there is another store in west Beijing and three in Shanghai – had sold out the 4S, Ms. Wu said, with trouble only reported in one Beijing store.

Apple's five stores in China are reported to have the highest average revenue and highest traffic of any Apple store in the world. Last year, CEO Tim Cook said China was Apple’s fastest growing market, generating one-sixth of sales and growing four times over the previous year.

Amid the chaos of Friday's mismanaged release, a silver lining for Apple was the clear evidence of the huge popularity of its products in China, which have emerged as a status-symbol for the newly-wealthy and young urban middle-class.

Many of the more than thousand shoppers outside its store were thought to be scalpers, who dominate much of Apple’s business here despite the prevalence of many authorised resellers. Many Chinese prefer to pay an additional $100 to $150 for the $800 phone, instead of signing up to two-year contracts offered by Apple’s local carrier, China Unicom.

“We have waited two days, all for nothing,” said one scalper from northeastern Liaoning, who was among a group of dozen men hired by a local company to snap up the phones for resale.

“It has been a tough and long wait,” he said. “But I will be back tomorrow”.