This paper shows that if capital generates production externality, there exists a wedge between returns to money and to capital, driving the Friedman rule is not optimal. However, in the absence of capital externality, the Friedman rule may be valid even under imperfect competition.