German, British and European Union flags fly in front of the Reichstag building in Berlin, Germany July 20, 2016. REUTERS/Hannibal Hanschke/File Photo

BERLIN (Reuters) - British citizens will not need to leave Germany if their country leaves the European Union without an exit deal, an interior ministry spokesman said.

British citizens will retain their residence rights for a three months period, with further extensions possible, the spokesman said, adding that during that time, they would have to register to acquire a formal right to remain.

A transport ministry spokeswoman said Germany was in close contact with Britain with a view to avoiding disruption to air transport links in the case of a disordered Brexit.