Maryland Gov. Martin O’Malley (D) lambasted South Carolina’s governor during a trip to the state on Saturday, calling Nikki Haley a “tea party Republican” who has shortchanged her constituents on jobs, health care and education.

O’Malley was invited to a conference sponsored by the South Carolina Democratic Party by state Sen. Vincent Sheheen (D), who is eying a rematch with Haley next year.

During his address, the Maryland governor said “the ultimate test” for any elected leader is to “show me how your choices are working for me and my family,” according to a copy of his remarks distributed by an aide.

“Now, some of these new tea party Republican governors are funny in this regard, aren’t they?” O’Malley said at the event in Charleston. “They run on a platform claiming government isn’t working. Then when they’re in office, their own failure to do the job proves their point. Your current governor — bless her heart — is a case in point.”

O’Malley, a former chairman of the Democratic Governors Association who is weighing a presidential run in 2016, went on to criticize South Carolina’s unemployment rate of 8.7 percent as one of the highest in the nation. He said that under Haley, South Carolina graduates a lower percentage of high school students than 47 other states. And he said that South Carolina’s public colleges and universities have the highest tuition in the South.

O’Malley also criticized Haley for opting out of a provision of the federal health care law that would bring more people into the state’s Medicaid program.

“Once again, ideology trumps practical reality,” O’Malley said. “If you believe it is more important to poke the president in the eye than to promote the health of your fellow citizens and the financial solvency of your hospitals, perhaps you want to stick with Governor Haley.”

O’Malley’s appearance was sharply criticized by Republicans both in South Carolina and Maryland.

“He should go back to Maryland where he quite successfully legalized gambling, gay marriage, the end of the death penalty, and hiked taxes on everyone and everything he could think of,” Haley adviser Tim Pearson told CNN.

David Ferguson, the executive director of the Maryland Republican Party, who traveled to South Carolina for Saturday’s event, said O’Malley’s criticism was undercut by his own record on taxes and job losses in Maryland.

“Bless his heart,” Ferguson said. “Martin O’Malley’s criticism of Nikki Haley’s pro-business government is likely to fall on deaf ears. Controlling college tuition doesn’t make a dime’s worth of difference if students can’t find a job when they graduate.”