Gay and lesbian couples in the Kansas City area began exchanging vows on Friday after a federal judge struck down Missouri's ban on gay marriage as unconstitutional.

The first wedding happened almost by accident.

After hearing that gay couples were marrying in St. Louis, John Kenny Rodricks and Robert Gann went to the Jackson County courthouse to apply for a marriage license, not realizing that the order which paved the way for marriage equality in St. Louis did not apply statewide.

The couple was turned away.

But later in the day Jackson County announced that it would immediately begin issuing marriage licenses to gay couples after a federal judge struck down the ban in a separate case.

(Related: Federal judge strikes down Missouri's gay marriage ban.)

Moments later, Rodricks and Gann were married at the Jackson County courthouse.

“We said, 'Well, we're not leaving without a wedding license today,' and we sat downstairs in the recorder of deeds office and we didn't move,” Rodricks told ABC affiliate KMBC.

U.S. District Judge Ortrie D. Smith stayed his ruling pending an appeal, but Jackson County officials acted independently.