(CNN) - It could have been a crucial piece of opposition research: The South Carolina Democratic Party accused Mark Sanford, who criticized his rival for taking union contributions, of receiving campaign cash from labor groups himself during a past run for Congress.
Only problem? They had the wrong Sanford.
The dust-up began Tuesday morning with the news Boeing was expanding its footprint in the Palmetto State, investing $1 billion and creating 2,000 jobs over the next eight years.
Previously, labor groups had filed a complaint with the federal government, trying to stop Boeing from building airliners in South Carolina. The union said the decision to put the new plant in South Carolina was a move by Boeing to retaliate against a strike by company workers in Washington state.
The union later reached an agreement that allowed Boeing to open the South Carolina plant, resulting in the announcement Tuesday the firm was investing in the state.
Elizabeth Colbert Bush, the Democrat running for South Carolina's open House seat, praised Boeing's move, but the Sanford campaign was quick to highlight that Colbert Bush accepted contributions from unions that opposed Boeing's plant in North Charleston.
That's when the problems began for the South Carolina Democrats. The party accused Sanford in a press release of accepting union contributions in his 1998 and 2000 House re-election campaigns. The statement carried the screaming headline, "Colossal Hypocrite Mark Sanford Takes Union Contributions."
"Just when you thought Mark Sanford's strained relationship with the truth couldn't get any worse, we learn that he's criticizing Elizabeth Colbert Busch for something he's done," said SCDP Chairman Dick Harpootlian in a statement. "Mark owes Elizabeth an apology for this ugly attack."
But the "Sanford" they located with contributions from unions turned out to be the wrong politician – the contributions were actually made to a "Sanford Bishop for Congress."
The mistake was called out by Sanford's campaign, who asked for an apology from the South Carolina's Democrats' chairman.
Ultimately, the Democrats owned up to the mistake.
"We learned this evening that the information posted on OpenSecrets.org and used in this release is incorrect," spokeswoman Kristin Sosanie wrote. "We relied on an independent organization used by many journalism organizations and it's disappointing and unfortunate that the source appears to be in error. We apologize for any confusion that this error has caused."
OpenSecrets.org, also known as the Center for Responsive Politics, obtains its data directly from the Federal Election Commission.
"While we often catch errors and correct them for the public, in this case we didn't," said Viveca Novak, editorial and communications director. "The FEC, in the case of these contributions, had coded Democrat Sanford Bishop as Republican Mark Sanford. We pointed this out to the agency yesterday and have been assured that it is being fixed."
CNN's Paul Steinhauser contributed to this report.