Texas Governor Greg Abbott signed a new law that prohibits local ordinances banning fracking. Yet Abbott has bristled at similar top-down edicts from the federal government. As Texas attorney general, he sued the feds dozens of times in just such cases.

Abbott was the Texas attorney general from 2002 to 2015 before being elected as the state’s governor. During his time as the state’s top law enforcement official, Abbott made a speech at the 2012 Texas Hispanic Leadership Forum, where he told the audience:

READ MORE: Texas officially prohibits cities from banning fracking

“What I really do for fun is I go into the office, [and] I sue the Obama administration,” he said. This was a reference to his penchant for suing the federal government over clean water and air regulations from the US Environmental Protection Agency (EPA).

According to the Environmental Defense Fund, Abbott filed at least 31 lawsuits against the federal government between 2004 and April 2014. More than half of those suits were aimed at the EPA. All in all, the suits cost Texans nearly $4 million, EDF reported.

Among EPA issues challenged were:

- the agency's Endangerment Finding, which found that greenhouse gases are a key element of climate change and harm "the public welfare of current and future generations";

- three rules regulating greenhouse gases pursuant to the Clean Air Act, which Texas attorneys said was the agency's "crusade to regulate [greenhouse gases] at any cost and at break-neck speed [which] have created an environment of regulatory and economic uncertainty at precisely the wrong moment";

- the EPA's rules to limit air pollution from emission facilities;

- the agency's attempts to takeover the state's permitting system for greenhouse gas emissions after the state refused to follow federal environmental standards;

- the EPA's cross-state pollution rule that demanded a more stringent cap on sulfur dioxide and nitrogen oxide emissions for companies whose emissions travel over state lines.

In 2011, Abbott's office and the US Department of Justice also tussled over Texas' redistricting of electoral maps, which the feds claimed did not comply with the Voting Rights Act. Abbott sued to get the state's maps approved.

Texas sued over its voter ID law that was passed in 2011. The law needed federal approval pursuant to the Voting Right Act, which aims to limit disenfranchisement of minority voters. The feds denied preclearance of the law in March 2013, but the US Supreme Court struck down parts of the Voting Rights Act later that year, leading to further legal action.

Texas also challenged a portion of the Dodd-Frank Act in 2010 -- a law that aims steer clear of the type of economic collapse seen in 2008. The state also sued over a provision of the Patient Protection and Affordable Care Act -- or Obamacare -- requiring employers to provide contraception and free preventive care services in employee health plans.

“Obamacare’s latest mandate tramples the First Amendment’s Freedom of Religion and compels people of faith to act contrary to their convictions,” Abbott said when he joined six other states attorneys general and a group of Catholic organizations to challenge the contraception rule.

READ MORE: Texas judge delays Obama admin request to unblock immigration orders

Most recently, Abbott filed suit against President Barack Obama's executive action on immigration, which allows millions of undocumented immigrants to remain in the US. Twenty-five other states have joined the lawsuit.

“This issue in this lawsuit is not about immigration; the issue in this lawsuit is about abuse of executive power and if this abuse is not stopped it will erode the Constitution that has attracted so many people to this country for generations,” Abbott told NBC's 'Meet the Press' in December.

Last November, Obama declared that as many as five million undocumented arrivals who are parents of US citizens or permanent residents will not be deported. He also said they will enjoy the opportunity to work in the United States. Obama's announcement triggered a political firestorm as many Republicans argued that undocumented persons will take away jobs from Americans, as well as place an additional burden on limited state resources.

“President Obama abdicated his responsibility to uphold the United States Constitution when he attempted to circumvent the laws passed by Congress via executive fiat, and Judge Hanen’s decision rightly stops the president’s overreach in its tracks," Abbott said in February after the judge's injunction against the executive orders.

"We live in a nation governed by a system of checks and balances, and the president’s attempt to bypass the will of the American people was successfully checked today. The district court’s ruling is very clear – it prevents the president from implementing the policies in ‘any and all aspects.’”