In the mid-nineteenth century United States, several related but distinct bat-and-ball games were played somewhat regionally and competitively across the country, without any single set of rules yet established as dominant — these included variations sometimes called 'town ball,' 'the New York game,' and 'the Massachusetts game,' each with somewhat different specific rules regarding field shape, number of players, and how outs and scoring worked. The New York Knickerbocker Base Ball Club, formed in 1845, developed and published a specific set of rules (sometimes called the Knickerbocker Rules) that became the foundation for what eventually developed into modern baseball's specific rule structure, including the diamond-shaped infield and other still-recognizable features.
The American Civil War (1861–1865) played a significant, well-documented role in spreading this specific New York-derived version of the game nationally: soldiers from different regions, brought together in military camps, played the game together during periods of downtime, and many carried the specific New York rules home with them to their own regions after the war, contributing significantly to this particular version's subsequent national standardization over the following decades, at the expense of the competing regional variants that had also been played before the war. Baseball's subsequent organizational development — including the formation of the first professional league in 1871 and, significantly, the National League in 1876 — provided a stable, commercially successful institutional structure that further cemented the sport's popularity and cultural centrality, eventually earning it the widely used nickname 'America's national pastime' by the early twentieth century, a status the sport held largely unchallenged for decades before facing more serious competition for cultural primacy from other American sports, particularly football, in the more recent decades.