Women have typically been paid less than men throughout history. We investigate earnings in Swedish cigar making around 1900. Strength was unimportant, yet the gender wage gap was large. Differences in characteristics, such as age and experience, and different jobs within firms, account for two-thirds of the gap overall, and the entire gap for piece-rate workers. Firms were as willing to employ women as men in the better-paying piece-rate section, and women were willing to take those jobs. In contrast, discrimination was extensive in the time-rate section. Men in this section benefited from greater outside opportunities and customary wages elsewhere. Theory holds that labour market discrimination will reduce profitability, and make firm survival harder, a proposition that has never been tested historically. We find that cigar firms that feminized their workforces most extensively were most likely to survive. Product market competition prevented firms employing (overpaid) men to any great extent. We argue that economic historians must interpret industry-specific gender wage differentials in the context of workers' outside opportunities, and in the context of product markets, which can—and in this case did—limit firms' room for manoeuvre.