This paper investigates the driving forces behind banks' link formation in the interbank market by applying the stochastic actor oriented model (SAOM) developed in sociology. Our data consists of quarterly networks constructed from the transactions on an electronic platform (e-MID) over the period from 2001 to 2010. Estimating the model for the time before and after the global financial crisis (GFC), shows relatively similar behavior over the complete period. We find that past trades are a significant predictor of future credit relations which indicates a strong role for the formation of lasting relationships between banks. We also find strong importance of size-related characteristics, but little influence of past interest rates. The major changes found for the period after the onset of the financial crisis are that: (1) large banks and those identified as `core' intermediaries became even more popular and (2) indirect counterparty risk appears to be more of a concern as indicated by a higher tendency to avoid indirect exposure via clustering effects.