Barely more than a decade ago, same-sex couples couldn’t marry legally anywhere in the U.S. Today, the Supreme Court ruled that all states are required to issue marriage licenses to same-sex couples.

In the 12 years since Massachusetts’ highest court ruled same-sex couples in that state had the right to marry, proponents have made fast progress toward legal recognition for same-sex unions. Those 12 years have also been marked by a fair share of setbacks for the movement.

Through it all, Maine has played a defining role, illustrating how public opinion has shifted in favor of allowing same-sex unions. Here’s a look at the high points on the road to legal same-sex unions, with a special focus on Maine.

Hover over the right side of each photo to click for the next slide.

For a national perspective, has this video timeline showing the move toward universally legal same-sex marriage.