We present a model of imperfect price competition where not all firms can sell to all consumers. A network structure models the local interaction of firms and consumers. We find that aggregate surplus is maximized with a fully connected network, which corresponds to perfect competition, and decreases monotonically as the network becomes less connected until firms become local monopolists. When we study which networks are likely to form in equilibrium, we find that stable networks are not fully connected but are connected enough to rule out local monopolists. Our results extend to oligopolistic competition when consumerscan either buy from a single firm or from all firms.