This paper explores the determinants of the net interest margin (NIM) using unbalanced panel data from 2003 to 2017. This paper’s objective is achieved by using a two-step system generalised method of moment (GMM) for estimation. Three different models are to account for two alternative measures of market competition. The empirical results of these models indicate that operating cost, profit tax, interest rate risk, Lerner index, national savings, money supply and the T-bill rate have significant positive associations with the NIM. Meanwhile, operational size, credit risk and the inflation rate negatively affect NIM. Furthermore, operating cost, taxation and the money supply are the main factors that influence the NIM. The present analysis provides a comprehensive view of the Lerner index, which is a better measure for capturing the degree of market power than the concentration measure (HHI). Managerial efficiency and risk aversion are bank-level factors that do not significantly determine NIM. Operating costs could be decreased by adopting new banking technologies. Therefore, higher competition, lower operating costs and restricted uncertain conditions in a macro environment, particularly in the money market, could reduce the NIM.