By Harriet McLeod

CHARLESTON, S.C., July 30 (Reuters) - Five gay couples were denied marriage licenses on Wednesday at a South Carolina courthouse as they offered a symbolic challenge to the state's same-sex marriage ban.

As a crowd of supporters waited outside a Greenville County courthouse, the couples filled out marriage applications and were turned away. The couples were trying to push South Carolina to lift its ban after a ruling on Monday by a U.S. appeals court that struck down Virginia's same-sex marriage ban.

That appeals court would also have jurisdiction over gay marriage challenges in South Carolina, as well as North Carolina and West Virginia.

Ivy Hill, 27, and Misha Gibson, 36, were optimistic after their fourth unsuccessful attempt to get married.

"We could have full marriage equality in South Carolina within months," said Hill.

South Carolina Equality, a gay rights advocacy group, and the state chapter of the American Civil Liberties Union have launched a petition drive asking elected state officials to reconsider plans to keep defending a voter-approved state constitutional amendment banning same-sex marriages.

"This administration will continue to uphold the will of the people," a spokesman for Republican South Carolina Governor Nikki Haley said in a statement.

The ruling by the 4th U.S. Circuit Court of Appeals in Richmond, Virginia, prompted similar calls for swift resolution of court challenges in North Carolina and West Virginia.

North Carolina's attorney general, a Democrat, said his office would stop defending the same-sex marriage ban. But the state's Republican governor called for a stay on the pending court cases.

"This issue will ultimately be decided by the United States Supreme Court," said a spokesman for Governor Pat McCrory in a statement.

Same-sex marriage has advanced rapidly since the U.S. Supreme Court last year struck down parts of the federal Defense of Marriage Act, which had defined marriage as between one man and one woman.

Since the ruling, all the roughly 20 federal and state courts to address the issue have ruled against state bans. Nineteen states and the District of Columbia allow same-sex marriage.

(Editing by Letitia Stein and Peter Cooney)