The harshest rhetoric hurled between Republican presidential rivals Rick Perry and Mitt Romney in recent weeks has involved each side painting the opposing candidate as overly sympathetic to illegal immigrants.

The latest volley came Monday, after the Los Angeles Times reported that "[t]he Massachusetts healthcare law that then-Gov. Mitt Romney signed in 2006 includes a program known as the Health Safety Net, which allows undocumented immigrants to get needed medical care along with others who lack insurance."

Word of that program, which allows illegal immigrants to get health care at almost no cost, prompted the Perry campaign to accuse Romney of setting up an "illegal immigration magnet" in Massachusetts. The Romney camp told the Times they had understood that the law would not cover illegal immigrants, though officials involved in creation of the law countered that claim.

"The truth is Gov. Romney's plan intended to provide free health care to illegal immigrants, and the law and rules he approved were clear about providing free health care to illegal immigrants," Perry spokesman Mark Miner said Monday.

Romney spokeswoman Andrea Saul pointed out that, according to federal law, undocumented immigrants must be granted emergency health care -- and that if anything, it was current Democratic Massachusetts Governor Deval Patrick, not Romney, who was responsible for enacting laws making it easier for undocumented immigrants to receive further health care services.

"Federal law requires emergency medical care for illegal immigrants. And if illegal immigrants are getting access to additional healthcare in Massachusetts, it's liberal Gov. Deval Patrick that has made it easier for them to do so," Saul said in a statement. "All of the regulatory activities involving the Health Safety Net Fund, including who could get care, were made long after Mitt Romney left office."

Both Perry and Romney have been attacking each other over illegal immigration with the hope of painting their rival as soft on undocumented immigrants. And the question of who had put in place a "magnet" for such immigrants has been central to that debate. Here's Romney during last week's GOP presidential debate, speaking to Perry, the Texas governor:

"You put in place a magnet to draw illegals into the state, which was giving $100,000 of tuition credit to illegals that come into this country," he said. "...Texas has had [a] 60 percent increase in illegal immigrants...If there's someone who has a record as governor with regards to illegal immigration that doesn't stand up to muster, it's you, not me."

Perry's support for in-state tuition for illegal immigrants appears to have hurt him with the Republican base; he ended up apologizing after casting opponents of the position as heartless during a debate last month. (He was booed for his position.) Perry is also on record as opposing a fence on the U.S. border with Mexico, which he says would not be cost effective - another position that puts him at odds with many potential Republican primary voters. Perry instead supports some fencing combined with surveillance technology and "boots on the ground." (Herman Cain is among the GOP candidates who has embraced a full-fledged fence, which he wants electrified. Not to be outdone, Rep. Michele Bachmann is calling for a double fence.)

In the spirit of the old cliché "the best defense is a good offense," Perry has sought every opportunity to attack Romney on illegal immigration. At last week's debate, Perry dredged up the fact that Romney hired a company to care for his lawn that employed illegal immigrants, suggesting that, in light of that fact, "the idea that you stand here before us and talk about that you're strong on immigration is on its face the height of hypocrisy. "

Now Perry has hired veteran GOP insider Nelson Warfield, who helped Rick Scott win the Florida governorship in 2010 by aggressively attacking Scott's primary opponent Bill McCullough over illegal immigration. Warfield's presence is a sign - if one is even needed - that Perry will keep attacking Romney on illegal immigration in an effort to turn a weakness into a strength.

The risk for both men, of course, is that their rhetoric on illegal immigration will hurt them if and when they get to the general election with Hispanics, an increasingly crucial voting bloc. Romney seemed aware of the risk at last week's debate, when he called for the candidates to "step back" as the anti-illegal immigration rhetoric was ratcheting up.

"I think it's important for us as Republicans on this stage to say something which hasn't been said," he said. "And that is I think every single person here loves legal immigration. We respect people who come here legally."