Canada's Confederation on July 1, 1867 brought four eastern provinces together to form a new and unified country. To secure their admission, the provinces of Nova Scotia and New Brunswick were assured that a railway linking them with the two Central Canadian provinces—Quebec and Ontario—would be provided.