Scotland cap David Bates has signed a three-year contract to join Aberdeen from Hamburg after a fee was agreed with the Bundesliga 2 club.
The 24-year-old centre-half was out of favour in Germany after his move from Rangers in 2018.
Bates spent last season on loan to Cercle Brugge in Belgium's top flight.
Manager Stephen Glass told Aberdeen's website: "He is here amid strong interest from other teams, particularly with the transfer window due to close."
Aberdeen are awaiting international clearance for the former Raith Rovers defender, so he will watch his new club's Scottish Premiership match against Ross County from the stand.