We study the determinants of pricing in interbank markets. We develop a theoretical model that is capable of explaining observed facts that are not consistent with standard theories, in particular that there exist interest rate differentials for interbank lending and deposit rates which differ between banks and that banks use the interbank market to grow their balance sheet rather than just close any funding gaps or surpluses. From this model we also derive the prediction that interbank lending and deposit rates are determined simultaneously. We test this prediction empirically, using a rich data set with 16,000 observations on the Austrian banking system. We control for multiple factors that are usually difficult to observe, including the prevalence of relationship lending, the impact of perceived counterparty risk as observed through bilateral ratings and the position in the interbank network. We find significant evidence of the presence of all the aforementioned effects, as well as a significant effect of bank size. We also find that network centrality in the interbank market is best measured by Betweenness centrality. The prediction of simultaneously determined lending and deposit rates is confirmed by using the Durbin-Hausman-Wu test within the framework of a simultaneous equation model.