Residents from the seaside resort of Rimini on Italy's Adriatic coast quietly admit that a short drive to nearby microstate San Marino has allowed many to hide cash from the taxman for decades.

Landlocked inside Italy, this dwarf nation of 30,000 people has earned a reputation of turning a blind eye to ill-gained money and allowing fake companies to launder the cash.

But the heyday of tax-hopping and stashing away dodgy money may be over as the Most Serene Republic of San Marino is carrying out a quiet financial revolution -- with the intent of leaving some bad habits behind.

If we have to give up dodgy money we will, said Secretary of State for Finance Stefano Macina.

Those who come here to organize a tricky business or bring funds from the Mafia will be at risk.

A global crackdown by watchdogs makes criminal money a risky business for banks, while wealthy clients at the same time are no longer happy sitting on a pile of undeclared cash, looking for legal ways to lower tax and boost returns.

There are no checks at the border of this idyllic, hill-top stronghold of bank secrecy and anyone can walk into a bank and open an anonymous account with few questions asked.

Such habits meant that criminal organizations like the Mafia turn to the mini-republic for money laundering, experts like Pierluigi Vigna, a former chief prosecutor of Rimini, told a San Marino conference this month.

Fearing it would be cut out from competing in the global marketplace, San Marino began a complete overhaul of its financial system six years ago that sent a buzz across the medieval steps of its sleepy streets.

Two years ago we just were not presentable, said Antonio Valentini, the chairman of the newly created central bank of San Marino, which says it is the world's oldest republic.

It then created an independent central bank charged with watching its financial sector, and the Paris-based OECD has removed it from a black-list for tax havens that includes Andorra, Liechtenstein and Monaco.

San Marino is also taking steps to adopt tougher anti-money laundering rules, to crack down on bearer accounts and to make it tougher for foreigners -- mostly Italians from nearby provinces -- to elude payments of value added tax.

PAST SCANDALS

San Marino is holding bilateral talks with governments and central banks in Italy and other European Union countries that will allow it to sell financial products abroad and let its 12 banks open branches outside the tiny state.

What was the image of San Marino up until recently? They saw us as a band of thugs, said Marino Maiano, chairman of the Banca di San Marino, the country's second largest bank.

But it is partly our fault as we have been unable to project the right image when we had some scandals.

Yet, opening up to the world for a country that has made its fortune on bank reservedness is not an easy task, in particular when the interlocutor, the Italian central-left government, is promoting a policy of zero-tolerance against tax evasion.

This scarce willingness to communicate externally is part of our DNA, but it has somewhat penalized us, said central bank head Valentini.

San Marino officials believe their new co-operative approach will allow it to compete against more advanced low-tax financial centers such as Luxembourg, Ireland and Switzerland.

They also hope to convince Rome there will be a positive effect on the surrounding Italian regions if Italians begin to divert more investments to San Marino.

Removing bank secrecy is, however, out of the question -- leaving in place one magnet for funds that are helping other offshore financial centers such as Switzerland.

We know that up until Bologna, it's still easier to drive to San Marino than to Switzerland, says a San Marino-based private banker, asking not to be identified.