This study analyses legislative voting in the first ten Canadian Parliaments (1867–1908). The results demonstrate that party unity in the House of Commons dramatically increased over time. From the comparative literature on legislative organization, we identify three factors to explain this trend: partisan sorting, electoral incentives and negative agenda control. Our empirical analysis shows that intraparty conflict is primarily explained by the opposition between Anglo-Celtic/Protestants and French/Catholic members of Parliament. Once lawmakers sort into parties according to their religious affiliations, we observe a sharp increase in voting unity within the Liberal and Conservative caucuses. Ultimately, our results highlight the importance of territorial and socio-cultural conflicts, as well as agenda control, in explaining the emergence of parties as cohesive voting groups in the House of Commons.