HAGATNA, Guam — The lesbian couple that sued to overturn a gay marriage ban were put to the front of the line Tuesday when Guam became the first U.S. territory to recognize gay marriage.

Loretta M. Pangelinan, 28, and Kathleen M. Aguero, 29, drew the No. 4 slot as couples were assigned numbers when the Office of Vital Statistics opened at 8 a.m. But out of respect, they were allowed to be the first gay couple to get their marriage license.

They celebrated by planning to marry right away in a ceremony administered by a territorial official.

The couple that drew No. 1 were Deasia Johnson of Killeen, Texas, and her fiance, Nikki Dismuke, 37, of New Orleans. They have been together three years and are in the military.

They also planned to marry immediately, and they asked Pangelinan and Aguero to be witnesses for their ceremony.

“How can you not be emotional?” said Pangelinan, who began to cry when she heard the request.

Gay marriage in Guam became possible after U.S. District Judge Frances Tydingco-Gatewood on Friday struck down Guam’s prohibition on same-sex marriage. The developments in Guam also come as the U.S. Supreme Court prepares to issue a decision on the constitutionality of same-sex marriage this month.

Pangelinan and Aguero sued April 13 after a registrar denied them a marriage license because Guam law defines marriage as between two people of the opposite sex. The couple based their lawsuit on a 9th U.S. Circuit Court of Appeals decision in favor of same-sex marriage. The U.S. District Court of Guam falls under the 9th Circuit.

That same month, Guam Attorney General Elizabeth Barrett-Anderson directed officials to begin processing same-sex marriage applications, but territorial officials, backed by Gov. Eddie Calvo refused. The governor sued, and he was represented by an outside firm because the attorney general didn’t agree with the governor’s lawsuit.

Although the ban was struck down Friday, Tydingco-Gatewood gave the territory a couple of days to prepare the marriage applications.

Lillian Lee, 57, and her partner, Susan Diaz, 65, were also in line to get their marriage license application.

Lee thanked Pangelinan and Aguero for making “gay marriage possible.”