* Protest banner hangs in HK legislature before opposition walkout
* Mass resignations follow ousting of four democratic lawmakers
* Beijing says Hong Kong must be governed by patriots
* Western governments condemn Beijing over disqualifications
* TIMELINE-The impact of the national security law: (Updates with detail, comment)
By Yanni Chow and Yoyo Chow
HONG KONG, Nov 12 (Reuters) - Hong Kong's opposition staged a final show of defiance in the legislature on Thursday before resigning to protest against the dismissal of four of their colleagues in what they see as another bid by Beijing to suppress democracy in the city.
The withdrawal of the opposition from the city legislature will mean an end for what has been one of the few forums for dissent after Beijing's imposition of national security legislation in June and coronavirus restrictions ended pro-democracy protests that began last year.
Hong Kong's Beijing-backed government expelled four opposition members from the legislature on Wednesday for endangering national security after China's parliament gave city authorities new powers to curb dissent.
The remaining 15 opposition members of the 70-seat Legislative Council, known as Legco, then said they would quit in a solidarity with their colleagues.
"I suppose this is my last protest in Legco," opposition member Lam Cheuk-ting said after unfurling a protest banner vilifying the city's leader, Carrie Lam.
The opposition politician had briefly displayed the banner from the building's second floor, with the message: "Carrie Lam is corrupting Hong Kong and hurting its people; She will stink for 10,000 years."
The city's chief executive was not in the assembly at the time.
On Wednesday, Carrie Lam defended the expulsion of the four opposition members as being in accordance with the law and she dismissed suggestions the legislature would become a rubber stamp.
Opposition members have tried to make a stand against what many people in the former British colony see as Beijing's whittling away of freedoms, despite a promise of a high degree of autonomy under a "one country, two systems" formula, agreed when it returned to China in 1997.
China denies curbing rights and freedoms in the global financial hub but authorities in Hong Kong and Beijing have moved decisively to stifle dissent after anti-government protests flared last year and plunged the city into crisis.
While the legislators campaigned for democracy in the assembly, a younger generation of democracy supporters took their demands to the streets in months of sometimes violent protests.
"I never thought highly of the democrats," student Jasmine Yuen, 21, said of the opposition politicians, as she walked to classes. "But now that they've resigned we don't even have anyone on our side with voting rights in Legco."
China's Hong Kong and Macau Affairs Office condemned the resignations as "a blatant challenge to the central government's authority".
"We would like to warn these opposition members that if they want to use this to encourage radical resistance and beg for intervention from outside forces to drag Hong Kong into chaos again, that is a wrong calculation," the office said in a statement.
The disqualifications and opposition walk-out are likely to add to concern in the West about Hong Kong's autonomy as Joe Biden prepares to take over from Donald Trump as U.S. president, promising to promote democracy around the world.
U.S. national security adviser Robert O'Brien said the disqualifications showed the Chinese Communist Party had "flagrantly violated its international commitments" and was "expanding one party dictatorship in Hong Kong".
Britain's foreign minister, Dominic Raab, said the expulsions constituted an assault on Hong Kong's freedoms.
Germany, holder of the European Union's rotating presidency, and Australia also condemned the oustings.
The Chinese parliament cleared the way for the disqualifications with the passing of a resolution allowing Hong Kong to expel legislators deemed a threat to security or not holding allegiance to Hong Kong.
Chinese state media hailed its parliament's resolution as a "long overdue" step towards "the return of peace and prosperity" in Hong Kong. It also stressed the need for the city to be "governed by patriots".
The fate of Hong Kong's political opposition has been in doubt since the government, citing coronavirus risks, postponed September's legislative elections by a year. Critics saw that as a bid to kill the pro-democracy camp's momentum.
"The city is dying. It has been dying for some time. Now we're even more like China," said student Calvin Fan.
(Additional reporting by Marius Zaharia, Jessie Pang, Joyce Zhou and Aleksander Solum; Writing by Marius Zaharia Editing by Michael Perry, Robert Birsel)
Our Standards: The Thomson Reuters Trust Principles.