WASHINGTON – President Donald Trump had high praise for the nation’s attorneys general when he invited them to the State Dining room in March.

“You are very special people and doing a very special and important job,” Trump told the gathering.

Increasingly, their job is suing Trump.

Trump has faced more joint challenges from states in his first two years than either Barack Obama or George W. Bush did in their eight years in office, according to Paul Nolette, a political science professor at Marquette University who tracks the lawsuits.

Last week, Democratic attorneys general sued to stop the administration’s rollback of school nutritional standards and to block Trump’s requirement that at least two federal regulations have to be repealed before a new rule can be introduced.

Buttigieg-Pence:Tensions flare in 'long and complicated' relationship between mayor and VP

All the 2020 candidates:The Democrats challenging Donald Trump

“President Trump has demonstrated an utter contempt for congressional authority and the role that federal agencies play in protecting Americans,” California Attorney General Xavier Becerra, a Democrat, said in announcing what, by Nolette’s tally, is the 71st multistate challenge to Trump.

That’s almost twice the number filed against the Obama administration during his second term, when the spike in such lawsuits started.

Democratic attorneys general are winning more often.

That’s not because their suits are overall more successful, according to Nolette. It’s because they file them more often.

“Now, the Democrats are suing over basically everything,” he said. “They challenge almost every major thing that comes out.”

About half of the challenges are pending. Some could drag out past the 2020 election when Democrats hope Trump will be defeated at the ballot box and many of his actions could be undone by the next president.

Democrats won early victories in court against the administration’s attempt to reverse Obama rules on energy efficiency and other environmental regulations. They at least temporarily stopped rules that would have allowed employers to refuse to include birth control in workers’ insurance coverage by citing religious or moral objections.

Pelosi sit-down:How Nancy Pelosi leads divided Democrats through political turmoil, Trump's administration

Report:Navy official vacationed in Hawaii, billed government, belittled staff

They halted a Trump administration attempt to let small businesses offer health insurance plans that skirt requirements of the Affordable Care Act and to allow online publication of blueprints to make 3D-printed firearms.

Although the Supreme Court upheld Trump’s order limiting travel into the USA from several countries, litigation forced Trump to come up with second and third versions that were slightly narrower in scope.

The legal battles against policy don’t include the investigations into the Trump Foundation, Trump University and Trump Organization projects conducted by the New York attorney general’s office – which launched another broadside last month.

They’re yet another front in the Democrats’ war against Trump that accelerated after the party won more firepower in the midterm elections by taking control of the House and winning a majority of attorneys general seats.

After Colorado, Michigan, Wisconsin and Nevada elected Democratic attorneys general in November – giving Democrats control of the offices in 26 states plus D.C. – all four joined the Title X “gag rule” challenge. (Michigan Attorney General Dana Nessel withdrew from multiple suits filed by her GOP predecessor, including those against Obama’s Environmental Protection Agency.)

Even the Democratic attorneys general in Mississippi and Kentucky, where Trump remains very popular, have found reason to challenge the administration. Both are among the 23 attorneys general trying to bring back the net neutrality rules that Trump’s Federal Communications Commission killed.

There are a few challenges waged by coalitions of Republican attorneys general, but they share the Trump administration’s goals. In the most high-profile case, for example, a Texas-led coalition is trying to get rid of the 2010 Affordable Care Act, which Trump wants to do as well.

Attorneys general of both parties can fight on the same side. Last year, all 50 states reached a $575 million settlement with Wells Fargo to resolve claims the bank violated state consumer protection laws.

Nearly every state is involved in the opioid-related lawsuits against drugmakers, distributors and others. That outcome could be even bigger than states’ lawsuit in the 1990s against the tobacco industry.

It’s the partisan lawsuits against presidential administrations that are the biggest departure from the past.

One reason, said former Maine Attorney General James Tierney, stems from a Supreme Court decision in 2007 siding with Massachusetts and 11 other states against the EPA. The states successfully argued that the EPA is required to regulate greenhouse gases as pollutants. The court gave states “special solicitude” – or the authority to challenge the federal government in a way that cities, activist groups and others can’t, said Tierney, a lecturer at Harvard Law School.

Gridlock in Washington prompted Obama – who adopted a "pen-and-phone" strategy – then Trump to try to accomplish through executive actions what they couldn’t get through Congress. That makes the policies more vulnerable to legal challenge, Nolette said.

During the last administration, Republican attorneys general scored a big win by halting Obama’s signature regulation to combat climate change. They stopped Obama’s effort to shield as many as 5 million undocumented immigrants from deportation and allow them to legally work in the USA. Although the Affordable Care Act was not an executive action but approved by Congress, a GOP challenge resulted in curtailing the law’s expansion of Medicaid.

Texas Gov. Greg Abbott, a Republican, when he was the state's attorney general, once described his typical workday this way: "I go into the office, I sue the federal government and I go home.”

Democrats said their multitude of legal challenges to Trump is not payback but a reflection of Trump’s dismissal of the rule of law.

“This is a unique administration, which is generating an outsized response from the Democratic attorneys general,” said Sean Rankin, executive director of the Democratic Attorneys General Association. “No one is above the law. Donald Trump has had to learn that the hard way.”

Tierney said Trump made himself especially vulnerable to challenges early on because he was in a hurry to get things done so he made administrative law mistakes. The classic example of that is Trump’s travel ban, which courts rejected twice before letting the third version stand.

Tierney said the administration is making fewer mistakes that could lead to losses on procedural grounds, but he suspects there could be an increase in investigations of Trump by attorneys general.

When the details of special counsel Robert Mueller’s report on Russian interference in the 2016 election are made public, it could include details of possible state law violations that attorneys general might pursue.

Last month, a New York appeals court rejected Trump’s argument that the Constitution makes him immune from state lawsuits.

Newly elected New York Attorney General Letitia James, who campaigned on promises to investigate Trump, is following up on Trump attorney Michael Collins’ testimony to Congress that Trump inflated his net worth when seeking bank loans.

After a court said a watchdog group lacked the legal standing to challenge whether Trump’s businesses can receive payments from foreign governments, the attorneys general in Maryland and the District of Columbia refiled the challenge.

The district's attorney general, Karl Racine, subpoenaed documents from Trump’s inaugural committee.

That action came days before the nation’s attorneys general met with Trump during their winter meeting last month.

Calling out Racine for his support for a bipartisan criminal justice law Trump signed in December, the president drew laughter when he added, “I feel like you’re – like I know you.”

Racine replied, “I feel like I know you as well, Mr. President.”