We develop a simple model of financial intermediation with search and matching frictions between banks and firms. The model links credit market tightness --encapsulating the abundance of credit-- to the search and opportunity costs of credit intermediation. Search costs generate lending to unprofitable firms (i.e., zombies) and the opportunity costs of searching exert countervailing forces on the incentives for banks and firms to participate in zombie lending, generating an inverted U-shaped relationship between credit market tightness and the share of zombie lending. High bargaining power of firms decreases the opportunity cost of firms foregoing credit relationships, reduces the share of zombie firms and increases the efficacy of capital injections to reduce zombie lending. Using data for 31 industries in Japan over the period 2000-2019, we test and corroborate our theoretical predictions by constructing theory-consistent measures of credit market tightness and bargaining power. Consistent with our theory, the findings reveal that capital injections are more effective in industries with higher credit market tightness and greater bargaining power of firms.