The Missouri Compromise, signed in 1820 by President Monroe, provided the necessary legal base for the incorporation of Maine as a free state and Missouri as a slave state. This alternance was important (one incorporation of a free state together with the incorporation of a salve one ) contributed to maintain the necessary balance between the North and South in the US Senate.
Henry Clay was Speaker of the House of Representatives and worked hard to ensure the compromise and to break the blocking in the negotiations between South and North.