Québec Solidaire's Amir Khadir made history for the upstart political party. ((CBC))

Community activist and physician Amir Khadir has been elected in the Montreal riding of Mercier, beating Parti Québécois incumbent Daniel Turp.

Khadir, a Québec Solidaire candidate, was declared the winner in Mercier shortly after 10 p.m. after a tight race with Turp, a lawyer and experienced politician. 

The physician's victory is the first for the upstart sovereigntist party.

"We have to say it – this victory wasn't given to us," Khadir told a crowd of supporters gathered at the Medley, a nightclub in Montreal's Latin Quarter. "It gives us hope that another Quebec is possible."

QS enjoyed several high-profile endorsements in this campaign, including from Montreal constitutional lawyer Julius Grey; Claude Béland, former president of financial group Mouvement Desjardins; and singer Dan Bigras.

Turp, a law professor, was elected to Quebec's provincial legislature in 2003 after sitting as a Bloc Québécois MP from 1996 to 2000.

In 2007 Turp beat Khadir by 1,123 votes.