Slavery was legal in the territory and about 8,000 to 10,000 slaves lived there. When the question of admitting Missouri arose, there were exactly as many slave states as free states. The admission of Missouri would tilt the balance to the slave states. The
Ohio River had been a practical border between slave and free states, and Missouri was partly north of the mouth of that river.
Free states dominated the United States House of Representatives, making it important for the slave states to maintain the balance in the United States Senate.
The compromise that was reached admitted Maine as a free state and Missouri as a slave state. Slavery was forbidden north of 36/30 latitude except in Missouri itself.
The Oregon Territory bill of 1848 made Oregon a free territory. President James K. Polk signed it on the understanding that it was north of the latitude specified in the Missouri Compromise. The Missouri Compromise was ultimately repealed by the Kansas-Nebraska Act of 1854.