Hong Kong stocks advanced to seven-year highs on Thursday, as mainland investors rushed to buy shares in the city, betting their huge valuation gap with Chinese peers would narrow or even disappear.

Chinese investors snapped up the entire 10.5 billion yuan ($1.7 billion) daily investment quota for buying Hong Kong stocks under the Shanghai-Hong Kong Stock Connect scheme, the second day in a row the quota was used up.

The Hang Seng index ended 2.7 percent higher at 26,944.39, the highest closing level since January 2008. The China Enterprises Index gained 2.6 percent to 13,748.37 points, having also touched seven-year highs.

Among the most actively traded stocks on Hong Kong's main board were CCT Land, up 35.7 percent to HK$0.02, GOME , up 7.7 percent to HK$1.82, and SMIC, up 6.9 percent to HK$0.93.

Total trading volume of companies included in the HSI index was 5.2 billion shares.