Women have, on average, been less well-paid than men throughout history. This talk draws on three connected studies, where we investigate the gender wage gap in Swedish manufacturing industry around 1900 using a rich dataset of matched employer-employee information with national coverage. Of relevance for the present, we find that 1) among cigar workers, gender differences in earnings for workers paid piece rates can be fully explained by differences in experience and other productivity-related characteristics. Moreover, women did not shy away from competition but were just as likely to work in the more competitive and better-paying piece-rate section as comparable men. 2) Hiring women was a way to increase efficiency among non-discriminatory firms – firms that feminised faster were more likely to survive than other firms. The firm also mattered for top job wages (compositors) in 1900, with 3) the firm characteristics explaining 17 percent of the gap. Our results are important for understanding present gender wage gaps, women benefit from productivity-related wage settings; firms benefit from hiring women, and the importance of firm-specific factors should be considered when designing policies directed at the glass ceiling.