BOSTON — Massachusetts is marking eight years since it became the first state in the country where same sex couples could legally wed.

Thursday marks the anniversary of the day when the historic Supreme Judicial Court ruling took effect and couples could marry. Lawmakers would later allow out-of-state gay couples to marry here.

The group MassEquality, which supported the court decision, said 18,462 same-sex couples have wed in Massachusetts since May 17, 2004.

The anniversary comes as President Barack Obama publicly declared his personal support for the rights of gay couples to marry.

Since the Massachusetts court ruling, dozens of other states have approved strict barriers to same sex marriage.

A smaller number of states have either adopted gay marriage or agreed to recognize same sex couples married in other states.