Lawmakers and others in Democratic-leaning states have been howling over the past year about actions by the Trump administration and congressional Republicans that they say have undermined states’ rights. That includes promoting concealed carry legislation and attacking sanctuary status for immigrants to this week’s decisions on legalized marijuana and offshore oil drilling.

But it wasn’t too long ago that the shoe was on the other foot, with Republican states pushing back against the Obama administration’s intrusions on issues such as transgender rights and environmental regulation.

Promoting the constitutional protections for states’ rights — outlined in the 10th Amendment to the U.S. Constitution — has always been popular among politicians. But it also is situational. Recent history shows that how strongly a party feels about states’ rights can depend on whether it’s in power and how a specific policy affects other constitutional rights.

There’s been a steady flow of lawsuits from mostly Democratic-controlled states opposing Trump administration policies, partly on states’ rights grounds. That follows a pattern set by Republican-led states, which repeatedly sued the Obama administration.

Following is a look at some current and recent battles involving states’ rights arguments:


MARIJUANA

The federal government’s position on state laws legalizing marijuana is the latest high-profile states’ rights fight.

This week, Attorney General Jeff Sessions rescinded a 2013 Obama Administration policy pledging that federal authorities would not crack down on marijuana operations in states where they were legal as long as the states maintained tight regulations.

After Sessions’ announcement, U.S. Sen. Cory Gardner, a Colorado Republican, said Sessions was violating the will of the people of Colorado, a state where recreational marijuana is legal. Gardner threatened to hold nominations to the Department of Justice over the change.

Before the Obama administration’s announcement, states felt more risk in advancing laws to allow recreational or medical use of cannabis, which is classified under federal law as a dangerous drug. Since then, state laws allowing marijuana have become more common.

Currently, most states allow medical use. Recreational marijuana is legal in eight states, including California, where legal sales began this month.

Despite the federal policy change, the Vermont House passed a bill this week to legalize marijuana.


CONCEALED CARRY

The GOP-controlled U.S. House of Representatives voted largely along party lines last month to pass the Concealed Carry Reciprocity Act, which would prevent states from enforcing their own handgun permit laws against out-of-state visitors.

The measure, which is expected to be debated in the Senate this year, declares that citizens with valid state permits to carry concealed handguns — as well as those who live in several other states that don’t require permits to carry — can travel with their weapons nationwide without fear of prosecution.

Critics of the bill, including many Democrats and public safety professionals, argue that the measure is a blatant attack on the rights of states, which currently have the ability to choose which out-of-state permits to recognize.

They warn that popular tourist areas in states with strict gun laws, like New York City, could see a surge of people carrying loaded weapons. Supporters of the bill say the hodgepodge of state laws undermines the constitutional right to bear arms for self-defense.


SANCTUARY STATES AND CITIES

The Trump administration has threatened to withhold funding from states and cities that offer sanctuary status to immigrants, arguing that localities must cooperate with federal efforts to identify and remove those in the country illegally. Trump and Attorney General Jeff Sessions argue that the sanctuary approach to immigrants allows some criminals to be released instead of shipped back to their homelands.

But supporters of sanctuary policies say state and local officials should be allowed to decide how to treat non-citizens in their communities and how to best use their policing resources.

They argue that such jurisdictions have lower rates of crime and improved safety because immigrants who are victims or witnesses of crimes can report them without fear of deportation.

In November, a federal judge issued an injunction blocking Trump’s executive order that had directed the government to make sanctuary cities ineligible for federal grants. The decision said Trump’s order would “violate the Tenth Amendment’s prohibition against commandeering local jurisdictions” and other parts of the Constitution.


OIL DRILLING

Some Republican and Democratic governors of coastal states have spoken in opposition to Trump’s plan announced this week, to allow oil drilling in the Arctic and off the Pacific and Atlantic coasts.

The areas that would be opened are all federal waters — generally starting 3 miles off the coast — and several of them have been closed to drilling for decades.

State officials have warned of risks to their environments and tourism if drilling is allowed. Florida Gov. Rick Scott, a Republican, said he opposes drilling off his state’s coast and wants Florida withdrawn from consideration of new leases. Maryland’s Larry Hogan, another Republican, said he also opposes drilling off his state.

California Attorney General Xavier Becerra, a Democrat, said that state regulatory agencies will have a say in whether offshore drilling is allowed. If the federal government disagrees with that, it could set up another states’ rights legal dispute.


ELECTION COMMISSION

In another development this week, Trump disbanded a commission he assembled last year to investigate voter fraud in the 2016 elections, something he asserts without evidence cost him the popular vote.

State election officials of both parties bristled last year when the commission asked for detailed voter information, including names, partial social security numbers, party affiliations and voters’ history of participating in elections.

Some states sued over the request. Even after the administration clarified that it was asking only for information that states considered public, more than a dozen still refused to comply, including several Republican-leaning states.

Part of their argument was that running elections is the business of the states, not the federal government.


GAY MARRIAGE

Opponents of marriage rights for gays and lesbians argued for years that the policy should be left to the states to decide. They argued that state lawmakers, not judges or Congress, were best positioned to decide whether to sanction such relationships in any given state.

Dozens of states voted to amend their constitutions to outlaw same-sex unions, while courts and lawmakers in others started to legalize the relationships. Supporters of same-sex marriage argued that the bans were unfair, calling the issue a matter of equality that should not be left to the whims of popular opinion.

The U.S. Supreme Court agreed in a landmark 2015 ruling, finding that the Constitution requires states to issue same-sex marriage licenses and to recognize those licensed in other states.

The court rejected arguments from Kentucky, Michigan, Ohio and Tennessee, which sought to preserve their state laws defining marriage as between one man and one woman.


Follow Foley at https://twitter.com/rjfoley and Mulvihill at https://twitter.com/geoffmulvihill