By
The primary public balance, which excludes debt interest payments, swung to a surplus of 1.03 billion euros from a deficit of 882 million euros a year earlier, the ministry said.
Tax revenues rose 2.3 percent to a record 37.1 billion euros.
The government said it cut spending by 1.2 billion euros last year.
Portugal ended its 2011 bailout from the European Union and the International Monetary Fund in May, but is still working to bring down its debts and deficit as a percentage of gross domestic product.
The budget deficit target for last year was 4 percent of GDP excluding one-off loans to public transport companies.
The government has pledged to keep a tight budget and cut the deficit below 3 percent this year.