By David DeKok

HARRISBURG, Pa. (Reuters) - A gun rights lawyer pressed Harrisburg's mayor on Thursday to drop his defense of local firearm ordinances, saying Pennsylvania’s capital could be on the hook for hefty legal fees in a lawsuit enabled by a new Republican-backed state law.

Gun rights advocates have sued the financially distressed city challenging five local ordinances, with three of them thrown out on Wednesday by a Dauphin County judge who decided they were not permitted under state law.

If Harrisburg Mayor Eric Papenfuse, a Democrat, "rescinds all five ordinances, we will waive all attorney fees and costs," said Justin McShane, who brought the lawsuit on behalf of a state affiliate of Texas-based US Law Shield, which sells insurance to gun owners, and two individual plaintiffs.

McShane said the city faces a minimum of $250,000 in legal fees from his side alone and the total could go much higher as the case progresses. "If that scares people, they have a right to be scared," McShane said.

Harrisburg spokeswoman Joyce Davis said city solicitor Neil Grover is studying what to do next. The mayor has vowed to stand his ground, but there was no immediate decision on an appeal of the judge's decision.

The law that enabled McShane’s lawsuit was adopted in October by the Republican-led state legislature and signed by then-Governor Tom Corbett.

It gave the National Rifle Association and other gun rights advocates standing to sue municipalities with gun ordinances that were stricter than state law. The law also allowed full recovery of legal fees if the lawsuit was successful.

Many Pennsylvania municipalities rushed to rescind gun ordinances after the law was passed. Harrisburg refused, and became the target of the first lawsuit filed under the new law.

The local ordinances struck down by Judge Andrew Dowling on Wednesday banned unsupervised juveniles from carrying guns, banned guns in city parks, and outlawed carrying guns during civic disturbances.

The judge allowed the city to keep ordinances banning the discharge of a firearm within city limits and requiring reporting of lost or stolen firearms, ruling that they did not conflict with state laws.

(Editing by Frank McGurty and Will Dunham)