Maryland Gov. Martin O'Malley speaks at a rally in support of repealing the state's death penalty in Annapolis on Jan. 15. (Patrick Semansky/AP)

Everybody knows the Republican Party has moved to the right in recent years with the tea party’s rise. Attracting less attention, however, is the Democratic Party’s shift to the left, especially on social issues.

The trend, which results partly from generational change, is highlighted this year by the Maryland General Assembly’s surprising move to repeal the death penalty. Opponents have been trying to get rid of it for decades, and a major repeal effort failed in Annapolis as recently as two years ago.

Now the Senate, which historically has supported the death penalty, has voted 27 to 20 to end it. The House is expected to follow suit easily, and Gov. Martin O’Malley is certain to sign the bill. Voters still might decide to preserve executions as an option if the bill goes to referendum next year, but opponents are confident they can win that battle.

The historic turnaround on a high-profile issue reinforces the liberal tendency evident last year in the Democratic-dominated Free State. In its previous two sessions, the General Assembly approved same-sex marriage and in-state college tuition for illegal immigrants. Both issues then won ratification by popular vote in referendums in November.

To top it off, the legislature is on track to approve subsidies for wind power after three years of effort. It might tighten gun controls, as well.

“We are winning on the big issues, and we have generational politics on our side,” said Sen. Jamie Raskin (D-Montgomery), an unabashed liberal who managed the floor fight over the death penalty. “The Republican Party is going tea party, and the Democrats are going progressive.”

One consequence is that O’Malley will leave office in two years with a remarkably broad record of liberal accomplishments. That should help him attract support from the Democratic base if he enters primaries in a bid for the presidency, as many expect. But it might hurt him if he wins the nomination, because the Republican Party could assail him as too far to the left.

The tendency is evident in other states. Democratic governors signed bills abolishing the death penalty in Connecticut in 2012 and Illinois in 2011. Last year, Democrats led successful campaigns to approve same-sex marriage in Maine and Washington, as well as Maryland.

The change in Annapolis has arisen partly because liberal upstarts ousted moderate incumbents in recent Democratic primaries. One such insurgent was Sen. Karen Montgomery (D-Montgomery), who beat Rona Kramer in 2010 in the 14th District, which stretches from Silver Spring to Damascus.

Montgomery won that primary in part because of her outspoken opposition to the death penalty, which Kramer supported. Montgomery said she thought Kramer was out of touch with the district on that issue and others, such as the environment.

“People were sitting there waiting for somebody to just speak out,” Montgomery said. “I think they recognized that I was more congruent with their beliefs.”

A key to the liberals’ success has been the flexible approach taken by Senate President Mike Miller (D-Calvert). He personally opposed same-sex marriage and voted to keep the death penalty. But he stepped aside and didn’t use the powers of his office to block the bills as he might have.

Senators said Miller would rather go with the flow than risk losing his position by alienating the majority in the Democratic caucus. One said Miller’s position reminded him of Machiavelli’s dictum: “Whosoever desires constant success must change his conduct with the times.”

In the public as a whole, one well-known reason for shifts on social issues is the entry of young voters with comparatively tolerant attitudes. Another, according to politicians and academic specialists, is voter fatigue over endless angry debates and political posturing.

When the public sees pragmatic reasons to change policy, it’s willing to do so even on issues that have been stalemates for years.

On the death penalty, for instance, opinion shifted partly because advances in DNA technology have revealed numerous cases in which people sent to prison or even death row were later cleared. Also, with crime rates down, there’s less impetus to get tough on offenders.

“The hot-button issues aren’t so hot anymore,” said Del. Sandy Rosenberg (D-Baltimore), who for seven years has a been a leader of the campaign in Annapolis to end the death penalty. “I would hope that it’s greater recognition on the part of the public that we’re here to solve problems, and red meat issues aren’t the way.”

I discuss local issues Friday at 8:50 a.m. on WAMU (88.5 FM).