Scores of protesters, many wearing masks, broke through a police cordon and entered Macedonia's parliament late Thursday, attacking lawmakers to protest the election of a new speaker despite a months-long deadlock in talks to form a new government.

The protesters stormed parliament after the country's opposition Social Democrats and parties representing Macedonia's ethnic Albanian minority voted for a new speaker. Shouting and throwing chairs, the protesters attacked lawmakers, including opposition leader Zoran Zaev, who television footage showed bleeding from the forehead.

Television footage showed Zaev and other Social Democrat lawmakers surrounded by protesters waving national flags, shouting "traitors" and refusing to allow them to leave.

Macedonia has been without a government since December, when former Prime Minister Nikola Gruevski's conservative party won elections, but without enough votes to form a government.

Coalition talks broke down over ethnic Albanian demands that Albanian be recognized as an official second language. One-fourth of Macedonia's population is ethnic Albanian.

Zaev has been seeking a mandate to form a government for months, after reaching an agreement with an ethnic Albanian party, the Democratic Union for Integration, to form a coalition government. However, President Gjorge Ivanov refused to hand him the mandate.

The Assembly of the Republic of Macedonia, as the Balkan nation's parliament is known, has been deadlocked for three weeks over electing a new speaker. Zaev had suggested earlier Thursday that one could be elected outside normal procedures, an idea immediately rejected by the conservative party as an attempted coup.

Zaev went ahead with the vote, and a majority in parliament elected Talat Xhaferi, a former defense minister and member of the Democratic Union for Integration.

Police said about 10 officers were injured during the melee and that reinforcements have been sent to assist those inside the parliament building.

DUI party spokesman Artan Grubi told Telma TV in a telephone interview that Zaev and three other lawmakers had been injured.

"This is a sad day for Macedonia," Grubi said.

The protesters who stormed parliament Thursday night were among a group of demonstrators who have been holding protest rallies nightly for the past two months in the streets of Skopje and other cities in the country over the political situation. Many are supporters of Gruevski.

European Union Enlargement Commissioner Johannes Hahn condemned Thursday's violence, saying in a tweet that "Violence has NO place in Parliament. Democracy must run its course."

Sweden's ambassador to Macedonia, Mats Staffansson, speaking on behalf of other European diplomats, reminded the country's politicians of the need for dialogue and said "it is the responsibility of the police of this country to make sure that this kind of violence does not happen."