Around Morgantown, the college town on the banks of the Monongahela River, it’s not uncommon to see University of West Virginia students sporting blue-and-gold shirts that read “Best Virginia,” history professor Jason Phillips says. The cheeky slogan does a good job of summing up the friendly — and once not-so-friendly — rivalry the residents of this mountainous Appalachian region have with the “other” Virginia, dating back to the earliest days of the country.

In fact, until the outbreak of the Civil War, the two states were part of the same Virginia, a British colony-turned-American commonwealth that was home to Founding Fathers Thomas Jefferson, James Madison and George Mason. But those who lived west of the Allegheny Mountains always felt distinct from the Tidewater aristocrats who tended to dominate state politics. As far back as the early 1800s, leaders in modern-day West Virginia were complaining about unequal representation in the state government in Richmond, and particularly the laws restricting voting rights to large landowners. The west’s mountainous terrain made the vast plantations of eastern Virginia impractical. So men owned small plots of land or were tradesmen instead. And that same geography influenced the west in another key way: Without large plantations, there wasn’t much need for slavery. The Tidewater region, in contrast, had the nation’s highest concentration of slaves.

It was eastern Virginia that had the backward economy and culture back then.

But that wasn’t the reason for western Virginians’ dramatic decision to split off and form their own state in 1861, says Joe Geiger, director of archives and history for the state. “I think what it came down to was where one’s loyalty lay,” he says, referring to the state or the Union. Republican Abraham Lincoln’s election in November 1860 prompted the seven states in the Deep South to secede from the United States. Four more border states, including Virginia, voted to secede after the Battle of Fort Sumter in April 1861.

Not everyone in the state, particularly those in the west, were convinced it was a good idea. The vast majority of delegates from the western Virginia counties voted against the proposal when the Richmond Convention approved secession. And they weren’t the only ones; Phillips notes that regions of northern Arkansas, eastern Tennessee and western North Carolina also tried to leave their mother states and remain in the Union. But western Virginia was the only one that succeeded in doing that. Its leaders cleverly reformulated a Unionist state government, calling into session the state assembly in Wheeling, made up of members still loyal to the Union and granting their own region the right to split from Virginia and form a new state: Kanawha, the name of one of the region’s major counties. The name was eventually changed to West Virginia. They also got a hand from Union troops, who defended the region from an invasion by Robert E. Lee and the Confederate army, something they weren’t able to do for other pro-Union areas farther south. On Dec. 31, 1862, President Abraham Lincoln signed the statehood bill recognizing West Virginia as part of the United States.

West Virginians at the time had plenty of reason to throw their lot in with the North, rather than with their fellow Virginians and the “peculiar institution” on which their economy relied. It was eastern Virginia that had the backward economy and culture back then, while the west was rapidly diversifying, attracting new immigrants and developing railroads, mining and manufacturing. With borders along Ohio and Pennsylvania, they were part of what would become “the rising industrial belt of America,” says Phillips.

Fast forward a century-and-a-half, and it’s just the opposite: West Virginia has earned a reputation as a stagnant backwater while Virginia is seen as a fast-moving, knowledge-based economy with population growth far outpacing its existing infrastructure. Virginia was forced to redefine its economic, political and social future after the Civil War, explains Phillips, and became “much more innovative and willing to consider new forms of labor and investing in different industries.” Now the same reality faces its fellow Virginians on the other side of the mountains. Phillips is confident West Virginia can reinvent itself in the 21st century, and this time, “it won’t take a Civil War.”