We construct a cash-credit model with positive externalities in the production of credit goods. It is shown that under suitable conditions, the Friedman rule is not optimal and there exists an optimal nominal interest rate that maximizes the social welfare and output. This is because increasing the nominal interest rate improves sectoral misallocations caused by externalities in our economy.