Spain announced it was suspending plenary meetings of parliament, halting flights to Italy and banning large scale gatherings in Madrid and elsewhere as the government came under fire for not acting faster to contain the spread of coronavirus.

The capital city has become the focus point of the virus’s spread — accounting for almost half of Spain’s 1,622 cases as of Tuesday afternoon — and schools, kindergartens and universities will be closed in the Madrid region for at least two weeks.

The socialist government of Pedro Sánchez said it is seeking to avoid an “Italian scenario”, the transmission of coronavirus throughout the country, but its critics have attacked it for an abrupt shift in policy over the past 48 hours.

This weekend, almost all of the country’s mainstream parties participated in International Women’s Day marches, including several cabinet ministers, while the far-right Vox party held a mass rally.

“It is going to take time to see the effectiveness of these measures,” said Salvador Illa, Health Minister, who added that a sharp increase of cases on Sunday evening had led the government to alter its response. “And if we see that they are not effective, and we have to take additional measures, we will take them.”

As of Tuesday afternoon, there were 782 cases of coronavirus in the Madrid area, and 195 in the Basque country and 144 in Rioja, the two other main affected regions.

The Ministry of Health said overall 35 people had died, 101 were in intensive care and 135 had recovered.

Spain has carried out more than 17,500 tests for the virus.

As the virus spread in Madrid, Javier Ortega Smith, a leading Vox MP, said he had tested positive for the coronavirus.

That prompted the cancellation of this week’s plenary session of the Chamber of Deputies and the Senate.

Mr Ortega Smith and other elected officials from Vox had previously attended the party’s rally on Sunday, raising fears about infection.

Vox said on Tuesday that the rally “was an error for which we ask pardon”, as it called for the government to institute more drastic measures, such as border controls. In a reference to senior ministers’ attendance at the Women’s Day march, it added:

“We believed that the government would put the health of Spaniards before its propaganda agenda.”

María Jesús Montero, the government’s spokesperson and budget minister, countered that Spain’s citizens would “never understand any attempt to use a grave situation like this to grab a handful of votes”.

Under the steps announced on Tuesday, there will be a ban on public events with more than 1,000 people in Madrid and the two other worst hit areas, while other gatherings will be scaled down.

All large-scale sports events will take place behind closed doors.

Commercial flights to and from Italy will be suspended for two weeks as of Wednesday and the government will take on more powers to control the supply of products needed to combat coronavirus.