Thousands of angry demonstrators burst onto the streets of Barcelona on Wednesday after Spanish police arrested 14 people in sweeping raids on Catalan government departments in a bid to halt the region's controversial referendum on independence.

Tensions flared between supporters of the referendum set for October 1 and police ordered to prevent the vote that has been suspended by Spain’s highest court.

At raided offices across the city, protesters shouted "Fascists!" and "Out, forces of occupation!" as members of the Civil Guard military police moved in in riot gear.

Several high ranking government officials were detained, among them Josep Lluís Salvadó, the treasury secretary, and Josep Maria Jové, secretary general of the finance department and number two to the vice president, Oriel Junqueras.

Among 41 raids, police searched the Catalan government’s economy, foreign affairs, and labour and social affairs departments, as well as offices in the Presidency.

They also confiscated a haul of 9.6 million referendum ballot papers - believed to be the government's entire consignment.