This paper investigates how the firm adjusts its internal structure and alters its incentive contracts in response to the market environment. Specifically, it is concerned with the firm's optimal hierarchical structure and the corresponding incentive contracts for the managers as a function of variables which are related to the degree of market competition, when the middle manager's sole function is information-gathering. Consistent with recent empirical literature, we show that under one measure of market competitiveness, an increase in competitiveness leads the firm to flatten its hierarchy and offer stronger incentives to its agents. However, under another measure, the reverse is true. The paper therefore not only offers a theoretical rationale for some of the recent empirical findings regarding the relation between market competition and the internal structure of firms, but also provides theoretical qualifications for these findings.