A divided federal appeals court Monday ruled that Virginia’s ban on same-sex marriage is unconstitutional.

The U.S. Court of Appeals for the Fourth Circuit, in a 2-1 decision, affirmed a lower court ruling striking down the marriage ban and a separate state law barring recognition of same-sex marriages legally performed elsewhere.

“Because we conclude that Virginia’s same-sex marriage bans impermissibly infringe on its citizens’ fundamental right to marry, we affirm,” Judge Henry Floyd wrote for the majority. He was joined by Judge Roger Gregory.