Stock markets in China and Hong Kong gained Monday as sentiment was buoyed after the news that pro-bailout parties in Greece gained sufficient votes to form a government.

Hong Kong's Hang Seng rallied 1.13 percent or 217.43 points to 19,451.37 and Chinese Shanghai Composite rose 0.44 percent or 10.05 points to 2,316.90.

Immediate concerns over the financial crisis in the euro zone eased after pro-bailout parties - New Democracy and PASOK - won enough seats (162 seats out of the 300 seats in the parliament) to form a coalition government in Greece. The election results eased worries of a near-term Greek exit from the 17-nation single currency area.

The markets will likely take some comfort, at least temporarily, from the fact that pro-bailout parties won a (narrow) victory in the Greek legislative elections on Sunday. However, the results were close enough to leave significant uncertainty over the composition of any coalition government, as well as its future relationship with the Troika, said a note from Credit Agricole.

Meanwhile, some analysts say pro-bailout parties' victory does not mean that the Greek voters are embracing the tough reforms tied to the bailout package but it's because of the fact that voters fear overruled their anger. The Greek voters understood that if they voted to an anti-bailout coalition, it would lead to the debt-ridden country's exit from the euro zone and intensify the nation's financial crisis in the immediate term.

Financials and Chinese developers' shares rallied in Hong Kong after Greek elections. China Overseas Land & Investment gained 2.60 percent and HSBC Holdings Plc advanced 1.27 percent.

Shares of commodity producers gained on a strong advance in commodities. Jiangxi Copper Co. gained 2.69 percent and China Shenhua Energy Co Ltd. rose 1.28 percent while CNOOC Ltd. advanced 2.50 percent.

The risk of Greece being removed from the euro has fallen considerably and investors think this is positive for emerging markets like China, Tang Yonggang, an analyst at Hongyuan Securities Co, told Bloomberg.