Spanish riot police clashed with Catalan voters in Barcelona on Sunday as the controversial referendum on breaking away from Spain began.

Spanish national police began to seize ballot boxes and voting papers from Catalan polling stations, the Interior Ministry said.

An Al Jazeera correspondent at one confrontation saw several people with bleeding faces after they were beaten by security forces. Some people who attempted to vote and fought with riot police were taken away in ambulances after being injured.

At another polling station, would-be voters chanted "We are people of peace" and "We are not afraid." Half a dozen armoured police vans and an ambulance stood ready nearby, the witness said.

Catalans were defying rain and police orders to leave designated polling booths as the referendum got under way on the region's secession that has challenged Spain's political and institutional order.

Organisers have asked people to block entrances and use passive resistance during voting, which started 9am (07:00GMT).

Spanish riot police smashed their way into a polling station in Sant Julia de Ramis, near the Catalan city of Girona, where Catalan President Carles Puigdemont was expected to vote.

Civil Guard officers with shields used a hammer to smash the glass of the front door and lock cutters to force their way in. Scuffles erupted outside between police and people waiting to vote.

A video on the El Pais newspaper's website showed helmeted riot police in a standoff with a group of angry voters at one Barcelona school. Voters raised their hands and shouted "out".

Police have been ordered not to use force, but to empty schools where polling stations deemed illegal have been set up.

"The government today is in a position to affirm that we can celebrate the referendum of self-determination - not as we wanted, but [it will have democratic] guarantees," Catalan government spokesman Jordi Turull told a news conference on Sunday.

People were concentrating in doors and hallways to block the entrance by riot police. Pictures from other voting stations showed crowds grouped in formation outside.

READ MORE: Spanish police seal off polling stations in Catalonia

Joaquim Bosch, a 73-year-old retiree at Princep de Viana high school, where a crowd of 20 people was growing, said he was uneasy about a possible police response to the crowds.

"I have come to vote to defend the rights of my country, which is Catalonia," Bosch said.

Tens of thousands of Catalans are expected to attempt to vote in a ballot that will have no legal status as it has been blocked by Spain's Constitutional Court and Madrid for being at odds with the 1978 constitution.

The Spanish interior ministry said in a statement on Saturday the "majority" of public buildings that had been identified as referendum sites had "stayed shut" and "only a few" are occupied by people "with the only aim" of obstructing police work.

In Madrid, thousands of people rallied on Saturday in favour of Spanish unity.

OPINION: Why Catalonia should be given a say on its future

Waving red and yellow Spanish flags, the demonstrators gathered in the central Plaza de Cibeles, in front of the capital's town hall, chanting "Catalonia is part of Spain" and "I am Spanish, Spanish, Spanish," - a cry usually heard during national team football matches.

The central government in Madrid had previously said 1,300 of 2,315 designated voting stations have been sealed off by police, who have been mobilised in the thousands in the region.

Regional separatist leaders have pledged to hold the referendum and called on 5.3 million eligible voters to cast ballots.

Defiant crowds gathered before dawn on Sunday in Barcelona and towns across Catalonia at schools and other facilities designated as polling stations. They were joining parents, children and activists who occupied the buildings over the weekend.