A person holds a rainbow flag during the Gay Pride Parade in San Salvador, El Salvador, on June 28, 2014. AFP PHOTO/ Jose CABEZAS (Photo credit should read JOSE CABEZAS/AFP/Getty Images)

By Keith Coffman

DENVER, July 21 (Reuters) - A Colorado county clerk who issued nearly three dozen same-sex marriage licenses agreed on Monday to halt the practice after the state's highest court ordered another clerk to stop issuing the permits to gay couples.

Pueblo County clerk Gilbert Ortiz said he would comply with the request by Colorado Attorney General John Suthers, in light of Friday's ruling by the Colorado Supreme Court that halted the practice in Denver County.

"I believe that ... Suthers is on the wrong side of history and my office is reluctantly ceasing to issue licenses as of this afternoon," Ortiz said in a statement.

Emboldened by a landmark federal appeals court ruling late last month in favor of gay marriage in neighboring Utah, the county clerk in Boulder became the first clerk in Colorado to begin issuing marriage licenses to same-sex couples.

That appeals court decision was stayed, and Suthers asked the Boulder clerk, Hillary Hall, to stop.

He later sued her, but a state judge rejected his lawsuit, and within hours both Denver and Pueblo counties said they would also begin handing out licenses to gay couples.

Suthers said in a statement that Ortiz's decision will avoid "further wasteful litigation."

"No matter one's views on the issue of same-sex marriage, the Supreme Court of Colorado has made clear that until it has had a chance to rule on the merits, clerks must enforce the state's laws, which are still in effect," Suthers said.

Colorado voters passed a constitutional amendment in 2006 that defined marriage as a union between one man and one woman. State law does provide for same-sex civil unions.

Hall said on Monday that the Boulder County Clerk's office will continue to issue permits to same-sex couples, despite renewed requests from Suthers that she cease.

"I think the least harmful and most sensible solution is to issue marriage licenses and avoid the potential of more civil rights violations while this plays out in court," Hall said in a statement. (Reporting by Keith Coffman; Editing by Daniel Wallis and Eric Walsh)