Media playback is unsupported on your device Media caption The BBC's Martin Patience says there is a carnival atmosphere on the streets

Thousands have joined pro-democracy protests which have spread in Hong Kong on China's 65th National Day.

The protesters want China to withdraw plans to vet candidates for the next Hong Kong leadership election in 2017.

Hong Kong leader CY Leung was heckled as he addressed a flag-raising ceremony, where he urged them to back electoral reforms set out by Beijing.

A student protest leader has said they will occupy government buildings if Mr Leung does not resign by Thursday.

Lester Shum, of the Hong Kong Federation of Students, told reporters there was "no room for dialogue" with Hong Kong's chief executive after he ordered police to fire tear gas at demonstrators at the weekend.

Mr Shum said student leaders would welcome an opportunity to speak with a Chinese central government official, but not with Mr Leung.

Image copyright AFP Image caption With schools and offices closed on the public holiday, families were seen in the streets on Wednesday

Former Hong Kong Governor Chris Patten told the BBC there should be "a new period of genuine consultation" over democratic reform.

Lord Patten said dialogue "must replace tear gas and pepper spray" and that the current situation represented "a breach of what the Chinese government have promised Hong Kong".

"They said these matters were within the autonomy of the Hong Kong government and they are now reneging on that."

Family atmosphere

Protesters have gathered at the main protest sites in the Central business district, Causeway Bay and Mong Kok.

A fourth protest site has also spread to Canton Road in Tsim Sha Tsui, a major shopping district several roads south of Mong Kok.

Carrie Gracie, BBC News China editor, Hong Kong

The 65th anniversary of China's communist revolution began in Hong Kong with a flag-raising ceremony made for TV audiences across China. Nothing was allowed to disrupt the choreography.

The only members of the public allowed to attend were dressed in red baseball caps and T-shirts, waving Chinese flags. One told me the democracy protesters "had ulterior motives and were marginal anyway".

Police were in attendance to protect both the flag and embattled Chief Executive CY Leung. He reminded his fellow citizens that Hong Kong's special status in China, known as "one country, two systems", means just that. It was an implied rebuke to protesters demanding Beijing overturn its restrictions on nominations for the 2017 leadership election.

The protesters are determined to be seen and heard. Some were outside the ceremony, turning their backs on the national flag.

And less than a mile away, crowds were voting with their feet, streaming into what they're now calling Democracy Square, an encampment filled with umbrellas and a sea of freedom flags. The national flag of China nowhere to be seen.

China media: HK 'social order'

Carrie Gracie: 12 hours of protests

World press follows Hong Kong protests

The BBC's Juliana Liu, in Hong Kong, says that many families and parents with young children were in the streets on Wednesday, changing the atmosphere dramatically compared to Sunday, when police fired tear gas and pepper spray at the crowds.

Mr Leung attended a ceremony marking China's 65th National Day, which celebrates the founding of communist China in 1949.

Media playback is unsupported on your device Media caption A drone captured the scale of the protests on Monday 29 September

The flag-raising ceremony went ahead peacefully but a fireworks display was cancelled.

Mr Leung said that while people had different ideas about what constituted a "desirable reform package", it was better to have the right to vote than not.

Beijing ruled last month that it would allow Hong Kong people to elect their next leader in 2017. But the choice of candidates will be restricted to those approved by a pro-Beijing committee.

Image copyright Reuters Image caption Protests spread to a major shopping district popular with visitors from mainland China on Wednesday

Image copyright Reuters Image caption Hong Kong district councillor Paul Zimmerman raised a yellow umbrella - a symbol of the protests - at a reception following the flag-raising ceremony

Image copyright AP Image caption Protecting police from the rain... Hong Kong demonstrators have been dubbed the "politest protesters" by social media users

China challenge

The demonstrators - who include student groups, supporters of the Occupy Central movement and others angered by the police response - were hoping for greater numbers on Wednesday.

Occupy Central co-founder Chan Kin-man said the protests would spread like "blossoming flowers" unless the government started to listen to their demands.

There are no signs of concessions from Beijing. On Tuesday Chinese President Xi Jinping told Communist Party leaders that his government would "steadfastly safeguard the long-term prosperity and stability of Hong Kong and Macau".

Image copyright Reuters Image caption Chief Executive CY Leung, third right, did not specifically refer to the protests in his address

The protests are seen as a direct challenge to Beijing's grip on the territory's politics. Analysts say leaders are worried that calls for democracy could spread to mainland cities.

News of the protests is being heavily censored in mainland China. Media have blamed "radical opposition forces" for stirring up trouble.

The White House said the legitimacy of Hong Kong's chief executive would be greatly enhanced "if the Basic Law's ultimate aim of selection of the chief executive by universal suffrage is fulfilled and if the election provides the people of Hong Kong a genuine choice of candidates representative of the voters' will".

Hong Kong democracy timeline

1997: Hong Kong, a former British colony, is handed back to China under an 1984 agreement giving it "a high degree of autonomy, except in foreign and defence affairs" for 50 years

2004: China rules that its approval must be sought for changes to Hong Kong's election laws

June-July 2014: Pro-democracy activists hold an unofficial referendum on political reform and a large rally, which is followed by protests by pro-Beijing activists

31 August 2014: China says it will allow direct elections in 2017, but voters will only be able to choose from a list of pre-approved candidates; activists stage protests

22 September 2014: Student groups launch a week-long boycott of classes in protest

2017: Direct elections for chief executive due to take place

2047: Expiry of current agreements

Q&A: Hong Kong's democracy controversy