Beijing's top representative in Hong Kong warned foreign powers on Thursday that they would be taught a lesson if they tried to use the global financial center as a "pawn," as tensions escalated between China and Western governments over the city.

Luo Huining, the director at China's Hong Kong Liaison Office, was speaking at a ceremony to mark an "education day" for the National Security law, which authorities have organized to promote the sweeping legislation China imposed last year.

"We will give a lesson to all foreign forces which intend to use Hong Kong as a pawn," Luo said.