MADRID (AP) — Credit ratings agency Moody's says it has raised its outlook for Spain's banks to positive, scrapping the negative rating it had held for seven years.

The agency said in a statement Thursday that the upgrade reflected its estimation of bank credit worthiness over the next 12-18 months, adding that Spain's "robust economic recovery" was strengthening the country's financial institutions.

Spain, European Union's fifth-largest economy, was hit hard by the financial crisis and only emerged from a double-dip recession at the end of 2013.

The economy has expanded for the past seven quarters and is among the fastest-growing in the EU, with a forecast 3.1 percent rate this year.

Moody's Investor Services' sovereign debt rating for Spain is Baa2 with a positive outlook.