Small and medium enterprises (SMEs) are important for employment and economic activity; however, they are perceived to lack adequate financing, which hampers their growth. As a consequence, governments have implemented a number of programs to foster SME lending and attention has focused on improving the institutional environment, such that the financial system is more willing to lend to SMEs. In this paper, we directly ask banks (the main providers of SME external finance) what factors they perceive as drivers and obstacles to financing SMEs. We also study to what degree competition and the institutional framework play a role in banks' decisions. To do so, we use a unique survey of banks in Argentina and Chile, two neighboring emerging countries with significant differences in how their institutional environments are viewed, and thus expected to shape banks' willingness to deal with SMEs. The paper shows that, despite alleged differences in the countries' environments regarding rules, regulations, institutions, and ease of doing business, SMEs have become a strategic segment for most banks in both countries. In particular, banks have begun to target SMEs due to the significant competition in the corporate and retail sectors. They perceive the SME market as highly profitable, large, and with good prospects. Moreover, banks are developing coping mechanisms to overcome the particular institutional obstacles present in each country and to compete for SMEs. Banks' interest in SMEs is not based on government programs, yet policy action might help reduce the cost of providing financing, especially long-term lending. -- small and medium enterprises, bank finance, financial constraints, banking market structure, institutional factors, regulation, competition