It rises in the Allegheny Mountains from the confluence of two lesser streams near Fairmont in Marion County, West Virginia, not far from the headwaters of the Potomac River which flows the opposite direction, towards the Atlantic Ocean. It flows north into Pennsylvania where it unites with the Allegheny River to form the Ohio River at Pittsburgh.