SHANGHAI, Jan 20 (Reuters) - China stocks ended higher on Friday ahead of the Lunar New Year holidays, as strong foreign inflows boosted sentiment after the country said the worst in its battle against COVID-19 was over.

** China's blue-chip CSI 300 Index added 0.6%, touching a 5-month high, and the Shanghai Composite Index gained 0.8%.

** Hong Kong's Hang Seng Index rose 1.8%, while the Hang Seng China Enterprises Index climbed 2.3%.

** In the week ahead of China's new year holidays, the CSI 300 Index added 2.6%, while the Hang Seng benchmark was up 1.4%.

** China said the worst was over in its battle against COVID-19 ahead of what is expected to be the busiest day of travel in years on Friday, a mass movement of people that has fed fears of a further surge in infections.

** Foreign investors bought a net 9.2 billion yuan ($1.36 billion) of China shares via the Stock Connect scheme in a 13th buying streak on Friday.

** In only three weeks of 2023, foreign buying of Chinese stocks reached 112.5 billion yuan ($16.61 billion) and exceeded last year's total.

** Resource shares jumped 2.7%, new energy firms added 2.1%, and infrastructure companies surged 3.1%.

** Tech giants listed in Hong Kong advanced 2.7%, with food-delivery giant Meituan jumping nearly 5% and e-commerce company Alibaba up 3.7% to become the biggest boost to the Hang Seng benchmark.

** "Investor sentiment edged down ahead of Chinese New Year (CNY) on quieter trading activities," said Morgan Stanley in a note.

** "Market factors supportive of Chinese equities continue to play out; CNY effect may trigger temporary profit taking and could offer buy-the-dip opportunities."

** Separately, China kept benchmark lending rates unchanged for a fifth month on Friday, as expected, but analysts say future cuts are possible as the central bank has pledged to support the COVID-ravaged economy. ($1 = 6.7715 Chinese yuan) (Reporting by Shanghai Newsroom; editing by Nivedita Bhattacharjee)