This study tests whether alignment between a firm's technology strategy and its knowledge structure impacts firm performance. We examine how the internal and external R&D strategies align with the depth and diversity of a firm's technology portfolio. The results show that long-term performance of a firm with high technological depth deteriorates when the firm enhances its internal R&D intensity, but enhances when the firm increases its external R&D alliance intensity. But in contrast, performance of a firm with high technological diversity enhances when it increases its internal R&D intensity, but deteriorates when it increases its external R&D alliance intensity.