UPDATE 3-Hong Kong on edge as protests erupt ahead of handover rally

* Police fire pepper spray to disperse protesters

* Anger over extradition bill coincides with handover rally

* Protests pose big challenge for Chinese leader Xi Jinping

* Major roads in heart of financial centre paralysed

* Extradition bill suspended but opponents want it scrapped (Adds details on protests, security, flag-raising ceremony, paragraphs 1, 5, 7, 12, 22,)

By Anne Marie Roantree and Jessie Pang

HONG KONG, July 1 (Reuters) - Thousands of demonstrators faced off with riot police early on Monday, the anniversary of Hong Kong's return to Chinese rule, as authorities braced for more mass protests amid widespread anger over a controversial extradition bill.

More than a million people have taken to the streets at times over the past three weeks to vent their anger and frustration at Hong Kong's Beijing-backed leader Carrie Lam, posing the greatest popular challenge to Chinese leader Xi Jinping since he came to power in 2012.

Opponents of the now-suspended extradition bill, which would allow people to be sent to mainland China for trial in courts controlled by the Communist Party, fear it is a threat to Hong Kong's much-cherished rule of law and are demanding it be scrapped and Lam step down.

Police fired pepper spray to disperse some demonstrators, mostly black-clad students wearing hard hats and face masks, ahead of a flag-raising ceremony to mark the 22nd anniversary of Hong Kong's handover from British to Chinese rule.

Riot police with helmets and batons raced towards protesters at one point and held up red banners warning they would use force if the activists charged. The protesters once again paralysed parts of the financial hub as they occupied roads after blocking them off with metal barriers and wooden planks.

A tired-looking Lam appeared in public for the first time in nearly two weeks to attend the anniversary ceremony, flanked by her husband and former Hong Kong leader Tung Chee-hwa.

Weeks of unrest forced nervous authorities to deploy a massive security blanket around the waterfront Convention and Exhibition Centre, the venue for the flag-raising ceremony.

Lam said the government needed to change its style of governance and pledged to do more for young people.

"The incident that happened in recent months has led to controversies and disputes between the public and the government. This has made me fully realise that I, as a politician, have to remind myself all the time of the need to grasp public sentiments accurately," Lam said.

"After this incident, I will learn the lesson and ensure that the government's future work will be closer and more responsive to the aspirations, sentiments and opinions of the community," she said.