We examine the competitive effects of the vertical integration of gasoline refineries and retailers in the U.S. Adapting the first-order condition approach of static oligopoly games to the analysis of vertically related oligopolies, we develop a novel framework for directly evaluating the strategic foreclosure effect and the efficiencies associated with vertical integration. We find significant evidence for both vertical foreclosure and efficiency benefits. The foreclosure effect dominates the efficiency benefits for more than half of the refining firms in the sample. Vertical foreclosure is found to increase the wholesale price of refined gasoline by 0.2 to 0.6 cents per gallon.