Aficionados of the Etch a Sketch will recall a certain flaw in the toy: If you use it often, some of the lines drawn no longer disappear when you shake the device, instead leaving an indelible trace of where you have been.

This is the problem Mitt Romney is encountering: He is shaking the device, trying to erase impressions left during this year’s primary contest. But he just can’t shake away the image of Russell Pearce.

Pearce, the former Republican president of the Arizona Senate, is the author and self-described “driving force” behind S.B. 1070, that state’s law — endorsed by Romney — cracking down on illegal immigrants. Pearce told The Post’s Felicia Sonmez this month that Romney’s “immigration policy is identical to mine,” and he told reporters this week that Romney “absolutely” gave him the impression that he saw the Arizona law as a national model.

Democrats, seeking to use this loose cannon against his own side, called Pearce to testify Tuesday before Congress on the eve of the Supreme Court’s review of the Arizona law. Republicans boycotted the hearing, sensing a political trap. Arizona Republican Gov. Jan Brewer sent regrets, too.

But Pearce, whose questionable activities include touting an old deportation program called “Operation Wetback,” is less aware, and he handled himself in just the manner Democrats had hoped. Enhancing the effect, his tie bore the “Don’t Tread on Me” emblem of the tea party, and his considerable jowls tugged his mouth into a perpetual scowl.

Pearce, who lost his seat last fall in a recall election, labeled the Obama administration and the U.S. Chamber of Commerce “unpatriotic.” He sounded the alarm about an “invasion of illegal aliens we face today — convicted felons, drug cartels, gang members, human traffickers, even terrorists” (never mind that border security has improved and violence has lessened). And he blamed the Sept. 11 attacks on “the failure to enforce U.S. immigration laws” (omitting the fact that the hijackers entered the country legally).

Sen. Chuck Schumer (D-N.Y.), chairman of the Senate Judiciary subcommittee holding the hearing, began with a claim that Pearce’s bill was “endorsed as a model for the country by Mitt Romney” — and Pearce was happy to help with the grave-digging.

Pearce dismissed as “blanket amnesty” the Dream Act, which would legalize the immigration status of undocumented immigrants who came to the United States as children, if they attend college for two years or join the military. Sen. Dick Durbin (D-Ill.) asked Pearce about a child brought to this country illegally as an infant who later graduates from a U.S. high school. “Because the parent didn’t file the papers, now the child must suffer?” Durbin asked.

“You need to blame those responsible,” Pearce replied, “and not us for being a nation of laws.”

Such harsh logic accounts for the recent NBC News-Wall Street Journal poll finding that President Obama leads Romney among Latinos by an astounding 47 percentage points. Romney himself has acknowledged that such a gap “spells doom for us.”

To shrink the gap, Romney, who vowed to veto the Dream Act, went on the campaign trail Monday with Sen. Marco Rubio (R-Fla.), who favors some legal status for those who would be covered by the act. Romney’s campaign says his claim during a primary debate that the Arizona law was a “model” for the nation referred only to the electronic verification of immigration status. (Alas for Romney, he endorsed the Arizona law more than once.) His campaign also tried recently to disown Kris Kobach, an immigration hard-liner, before admitting that the Kansas secretary of state is an “informal adviser.”

Pearce is not a Romney adviser, but he is the embodiment of the law that Romney embraced — and the baggage Romney now carries for seeking far-right support in the primary. On Tuesday, Pearce sat at the witness table, shaking his head in disagreement as others spoke about how the law encourages racial profiling and hurts legal Latino residents.

Would Pearce continue deportations even if the border were completely sealed? To do otherwise, he said, would be “demeaning to law enforcement.”

Does he support Arizona authorities using “dress” as a way to identify illegal immigrants? “You have to respond to reasonable suspicion to do your job,” he said.

Why didn’t the law simply require that everybody stopped by the police would be checked for immigration status, to avoid racial profiling? “I don’t want a police state,” he said.

No, he only wants that for people who don’t look like him.

Pearce, with a rare chuckle, allowed that it’s “usually the case” that he finds himself outnumbered when defending the immigration law. But he argued, correctly, that the law reflects “by far the majority opinion of my party.”

This is why Romney will have trouble making it disappear.