European Union states have agreed to cancel budget fines for Spain and Portugal and to set new deadlines for them to rein in their excess deficits, their representative body in Brussels has said.

The widely anticipated decision confirms proposals made by the European Commission in July to waive the sanctions, despite both countries having last year breached the EU deficit limit of 3% of gross domestic product.

The EU Council said in a statement that Spain would have two more years, until 2018, to bring the deficit below 3%.

Portugal would have one more year, to 2016, to reduce its deficit to 2.5%.

The waivers, using a provision for exceptional circumstances, come against a backdrop of rising anti-EU and anti-austerity sentiment across Europe and follow a decision to grant France similar leniency when it missed deficit targets last year.

Both Madrid and Lisbon must take "effective action" by 15 October and submit a fiscal report by that date, the Council said, confirming the recommendation made by the European Commission in July.

Spain may find it difficult to adopt new measures by mid-October as it is struggling to form a government after two inconclusive national elections in December and June.

After the summer break, the Commission will decide whether to freeze some EU funds to Spain and Portugal next year, a procedure within the remit of EU fiscal rules.