The present study investigates the impact of macroeconomic and bank-specific variables on non-performing loans (NPLs). To avoid the identification problem, two models are employed to address this impact. The first one tests the effect of macroeconomic variables including the growth of oil revenues, inflation, and the growth of GDP without the oil sector on the growth of NPLs. Data is quarterly over the period 2004:3 to 2019:3. The transition variable in this setup is the growth of oil revenues and its threshold is 9 percent, which divides the sample into oil booms and oil recessions. According to the results, inflation has a significant positive effect on NPLs. During the oil boom, oil revenues decrease the NPLs. Due to the immense size of the government and its current and capital expenditures, when oil revenues are lower, the government forces banks to allocate loans to finance projects with long maturity. Furthermore, the present study used PSTR to test the impact of bank-specific variables consisting of interest rate spread, loan loss provision, loan to deposit ratio, and NPLs. To do so, monthly data of 10 banks is used over 2016:04 to 2020:12. The transition variable is the interest rate spread at 1 percent, which categorizes the banks into two groups of good and bad. Good banks collect deposits with a low-interest rate and allocate high-rate loans with less chance of default. So, interest spread is the most important prominent determinant of decreasing NPLs, while the loan to deposit ratio is dependent on the banks belonging to which group. For good banks, the loan to deposit ratio decreases the NPLs, while for bad banks, it worsens the growth of NPLs.