Portugal police chief Paulo Valente Gomes resigned on Friday a day after thousands of off-duty officers staged a protest against the debt-wracked government's austerity measures.
"Following the events which took place yesterday (Thursday) in front of parliament, the chief of national police and public security has handed in his resignation," the interior ministry said in a statement.
The officers in civilian clothes broke through a security cordon outside parliament on Thursday and briefly occupied the steps leading up to the building.
Media reports estimated the number of demonstrators at between 8,000 and 10,000.
Portugal's Prime Minister Pedro Passos Coelho said Friday the incident "should not have happened", adding the officers had "broken the rules they were duty-bound to respect."
Unions said the rally was the biggest ever organised by the country's police, and warned that budget cuts planned for next year would "destabilise the work of the police" and that "public security would deteriorate."
President Anibal Cavaco Silva called for calm amid what he described as "difficult circumstances for our country" on Friday.
Eurozone member Portugal has had to enact draconian measures to reduce its public deficit and increase the efficiency of its economy to meet the requirements for receiving some 78 billion euros ($105 billion) in rescue loans.
The proposed 2014 budget, opposed by the leftist opposition and the unions, includes deep cuts in salaries and pensions for public workers.
It will face a final vote in parliament on Tuesday where the centre-right government coalition holds a comfortable majority.
The country's main union federation CGTP has called for a massive demonstration outside parliament on Tuesday.