COLUMBIA -- Republican legislators in South Carolina say they have no regrets over the years they spent writing laws to kick illegal immigrants out of the state and require voters to show picture ID at the ballot box.

Democrats, deeply opposed to both laws, found the reprieve they could not in the GOP-controlled Statehouse when the U.S. Department of Justice recently blocked the state's voter ID law and a federal judge in Charleston threw out key parts of the state's new illegal immigration law.

Lawmakers argued over the voter ID law for three years and spent the past six years building an illegal-immigration policy. Gov. Nikki Haley signed the voter ID law in May and the most recent -- and furthest reaching -- anti-illegal immigration law passed earlier this year.

The GOP is using the defeat as a rallying cry against President Barack Obama.

Senate Minority Leader John Land, D-Manning, said his Republican colleagues should learn a lesson. Their time, resources and staff energy is better spent on issues that threaten South Carolina's prosperity, such as challenges in education, rather than going to the mat with the federal government.

"We have to invest in ourselves, our roads, infrastructure, in our colleges, buildings, programs, etcetera," Land said. "We spend and waste all of our time on things like this immigration law, and the court struck down most of it.

The same as the voter ID law. It was cruel. It was not needed. The Justice Department in effect laughed at us."

Making college affordable and strengthening public schools should be job No. 1, Land said.

"That's the way you create jobs," he said.

The state's top four Republicans -- Haley, Attorney General Alan Wilson, House Speaker Bobby Harrell and Senate President Pro Tem Glenn McConnell -- pledge to use the courts to fight to see the laws are upheld and enforced.

Haley took aim at Obama.

"Just because this president thinks something is bad policy doesn't make it so," Haley spokesman Rob Godfrey said in a statement. "We will keep fighting for what we know is right for South Carolina, and when the feds get in the way, we will stand up for South Carolinians and their rights."

Harrell agreed that the problem is with federal policy.

"Under the current administration, we have witnessed an unprecedented misuse of federal resources to interject its ideology on state issues," he said. "Nowhere has this overreaching by the federal government been more prevalent than in South Carolina."

Harrell said the high-profile fight between Obama's National Labor Relations Board and Boeing Co. over union involvement is another example of the federal government clashing with South Carolina.

"It's a shame this administration is wasting so much time and energy of our federal resources to overstep its bounds and tread all over our state's rights," he said.

Rep. Wendell Gilliard, D-Charleston, said the state deserves better than the bitter political gamesmanship by Republicans, who are most interested in getting re-elected.

"They were dancing to the tune of the so-called tea party," Gilliard said. "They forgot that they were elected to represent the people, not to pander to the tea party."