Hong Kong shares eked out their first gain in four days on Thursday, as strength in defensives offset weakness for Sands China after its parent posted underwhelming second-quarter earnings, dragging the broader Macau gambling sector lower.

Tepid sentiment was further weakened by a fresh spate of profit warnings from Chinese companies ahead of their second-quarter corporate earnings reporting season that will start in August.

The Hang Seng Index rose 0.1 percent, helped by strength in defensive counters such as the Chinese telcos as turnover in Hong Kong stayed feeble, which has hurt the bourse operator, Hong Kong Exchange (HKEx).

HKEx fell 1.3 percent to its lowest since last October, but held above HK$100 a share after London Metal Exchange (LME) shareholders voted convincingly on Wednesday to accept its $2.2 billion offer. In 2012, it is down 19 percent.

"Sands China is the big theme today for shorts," said Benjamin Chang, chief executive officer of LBN Advisors, a firm that manages $450 million of assets in two China funds.

Sands China tumbled 4.9 percent, closing at its lowest since Dec. 20 and spreading weakness to its Macau gambling peers after its parent Las Vegas Sands Corp posted much worse-than-expected quarterly earnings. The parent was hit by lower profits at casinos in its key Asian markets, which previously helped offset flagging U.S. revenue.

Concern over the gambling sector's July revenue is beginning to surface, with some suggesting that the industry in Macau could see a first monthly decline since 2010, traders said.

SJM Holdings lost 3.5 percent, while MGM China shed 3.4 percent and Wynn Macau declined 3 percent.

Restaurant chain operator Ajisen (China) Holdings Ltd was one company issuing a warning of significantly lower first-half net profit. After the warning, which cited sluggish business and increased costs, the stock tumbled 9 percent, then recovered to end 3.9 percent off.

Chinese shampoo maker BaWang International (Group) Holding Ltd <1338 HK> slumped 10 percent after it warned of a first half loss.

Bain Capital-backed GOME Electrical Appliances bled a further 4.6 percent. China's second-largest home appliance retailer tumbled 14.5 percent on Wednesday after warning it expects a net loss for the first half of 2012, thanks to its e-commerce business.

"You would think after all the warnings that people would not be that surprised by now, but the magnitude of the move down for these companies suggests otherwise," LBN's Chang added.

WEAK PROPERTY PULLS CHINA INTO THE RED

Mainland Chinese markets reversed midday gains to end lower, with property developers weak after the official Xinhua News Agency said China's local governments must not challenge Beijing on property market controls, especially its limits on home purchases.

The CSI300 Index of the top Shanghai and Shenzhen listings shed 0.5 percent, almost wiping out its gains for the year. It is now up 0.1 percent in 2012.

The Shanghai Composite Index also slipped 0.5 percent. Shanghai volume rose from Wednesday, but was still 16 percent below the 20-day moving average.

China Vanke shed 2.1 percent in its fifth loss in six sessions, but bounced off day's lows which were its lowest intra-day level since June 26.

Although Vanke is still up more than 19 percent during 2012, investors have been taking profits recently after official data last week showed housing prices rising for the first time in nine months, sparking fears Beijing could clamp down further on the sector.