This paper investigates the impact of artificial intelligence (AI) technology on banks’ competitive advantages. We explore whether AI diminishes the advantage of large banks and enables small and medium-sized banks to leapfrog and overcome their liability of smallness. Using a longitudinal sample of Chinese banks and cross-level data on banks, firms, and firm loans, we document that banks implementing AI technologies are associated with more new firm loans than banks without AI technologies. We also show that small and medium-sized banks benefit more from utilizing AI technologies and enjoy greater new loan increases than their larger counterparts implementing these technologies. Moreover, we explore underlying mechanisms through which AI alleviates the liability of smallness. We find that AI implementation mitigates the influence of banks’ solvency risks on their lending capacity and reduces the impact of bank scale and scope on banks’ ability to issue new loans. Finally, we show that the AI effect is stronger in banks with internally developed AI technologies than those implementing external AI technologies. Overall, this paper provides the first empirical evidence of the effect of AI in mitigating the liability of smallness and enhancing the competitiveness of small and medium firms.