Spain has slumped ten places to a rank of 40 in a global index of perceived official corruption after a spate of scandals, watchdog Transparency International said.

In its Corruption Perceptions Index for 2013, the anti-graft organisation said Spain was the second biggest loser of points alongside Gambia, Mali, Guinea-Bissau and Libya.

The only country to tumble further was Syria, rocked by civil war.

Ireland has moved from joint 25th in 2012 to 21st for 2013.

Spain's five-year economic slump, which has forced it to adopt tight austerity laws, exposed how cosy relations between politicians and construction magnates fed a disastrous housing bubble.

The former treasurer of the governing People's Party (PP) told a judge that he had channelled cash donations from construction magnates into leaders' pockets, and he was found to have €48m in Swiss bank accounts.

The king's son-in-law, Inaki Urdangarin, was also charged this year with embezzling €6m in public funds.

"What the economic crisis has done is allow more public debate about corruption ... It is being exposed more and that affects perceptions," said Anne Koch, TI's director for European and Central Asia.

In Spain every sector - politics, the royal family and companies - was implicated in graft at a time when the country is really suffering

The scandals also highlighted a lack of accountability in political parties and even the watchdogs charged with keeping them clean. This prompted lawmakers to react to public outrage and draw up Spain's first freedom of information law.

Spain had been the only European Union nation without a law guaranteeing citizens a right to information on how public funds are spent. Ms Koch said the new law was still inadequate.

TI ranked 177 countries in 2013, placing New Zealand and Denmark joint first. The duo were also deemed the world's leastcorrupt in 2012, alongside Finland.

Somalia, North Korea and Afghanistan tied at last place, unchanged from last year.

The Berlin-based institute measures perceptions of graftrather than actual levels due to the secrecy that surrounds mostcorrupt dealings.

Greece remained the European Union state with the highest perceived level of corruption, although its four-point gain to 40 points helped it rise to 80th place from 94th in 2012.

The biggest improver on points was Myanmar, which emerged from 49 years of military rule in 2011.

The Southeast Asian state gained six points, taking it to 157 from a previous 172.

Among the major global economies, the United States ranked 19 and China 80, both unchanged from last year, Russia improved slightly to joint 127th place, from a previous 133 and Japan slid one spot to 18.