Updated

State-approved bans on same-sex marriage have been falling at a rapid clip since the Supreme Court struck down part of the Defense of Marriage Act last year.

The changes -- gay couples can now wed in 19 states and the District of Columbia -- reflect shifting social and political attitudes toward same-sex marriage. But they also reflect, in several cases, the opinions of Democrat-appointed judges who single-handedly struck down state-approved bans.

In a testament to the influence of judicial appointments, most of the judges responsible for the decisions over the past year were appointed by either President Obama or, two decades ago, Bill Clinton.

Among the justices to recently effect a major state change was U.S. District Judge Michael McShane in Oregon.

He threw out the state's voter-approved gay marriage ban on Monday.

McShane was nominated by Obama in January 2013 and was confirmed several months later. He was in a position to effectively enact gay marriage from the bench, as state officials earlier refused to defend Oregon's ban and said they wouldn't appeal.

The National Organization for Marriage sought to intervene, but both McShane and a federal appeals court rejected its attempts to argue in favor of the ban.

The next day, U.S. District Judge John E. Jones III overturned a 1996 Pennsylvania law barring recognition of gay marriage, calling it unconstitutional.

The National Organization for Marriage protested again, calling the ruling an "end-run around the democratic process" that "places the capricious will of one man above the desires of millions of citizens."

But Pennsylvania Gov. Tom Corbett, a Republican, on Wednesday decided to end his court fight because "the case is extremely unlikely to succeed on appeal." The governor's decision means that same-sex marriage will remain legal in Pennsylvania, without the threat that a higher court will reinstate the ban.

In Pennsylvania's case, the judge who threw out the ban was appointed by Republican President George W. Bush.

Only one other judge -- of the eight who have ruled against gay marriage bans since the DOMA decision -- is Republican-appointed. The other is Bernard Friedman, a U.S. District Court judge in Michigan who struck down that state's gay marriage ban in March, though the decision is being appealed. Friedman was appointed by Ronald Reagan.

Three of the judges -- in Oregon, Virginia and Utah -- were appointed by Obama in the last few years. Two were appointed by Clinton. One, in Idaho, was appointed by regional judges.

Several of these cases are still being litigated. In 29 states, judges are being asked whether gays should have the right to marry.

Advocates see a clear trend where gay marriage will increasingly be legalized.

After the Pennsylvania decision, National Gay and Lesbian Task Force Director Rea Carey said: "The momentum for same-sex marriage across the entire nation is unstoppable."

But opposition in some places remains strong. A spokesman for Montana Attorney General Tim Fox said he will vigorously defend the state's constitutional ban against the lawsuit brought by four gay couples.

In Utah, Gov. Gary Herbert said at a news conference Thursday he also is committed to defending his state's ban, and he blasted decisions against doing so by leaders in other states.

"For elected officials, governors or attorney generals, to pick and choose what laws (they) will enforce I think is a tragedy, and is the next step to anarchy," Herbert said. "We have an obligation as a state to defend those laws."

The Associated Press contributed to this report.