it was the capital of the holy roman realm in the fifteenth century , and in recent years became famous for being a center of international espionage when it was occupied by the allies following the end of the second world war .