Updated

Republican Mitt Romney tried to link rivals Rudy Giuliani and Hillary Rodham Clinton on Friday, suggesting the two share a "sanctuary state of mind" when it comes to illegal immigration.

First in a new TV ad and then on the stump, the former Massachusetts governor accused Clinton, a Democratic senator from New York, of favoring amnesty for the more than 10 million illegal immigrants already in the country. He also criticized Giuliani, a fellow Republican, for encouraging illegal immigration by discouraging their prosecution while he was mayor of New York.

"I think that sanctuary state of mind has to end in this country," Romney said after speaking to voters at a local farmstand. He suggested retracting federal funding for cities that harbor illegal immigrants and for states that provide driver's licenses and in-state tuition rates for their children.

"If I'm president we're going to use the power of the federal purse to make sure that as a nation we follow the rule of law," he added.

In a new ad that started airing Friday in the lead primary state, Romney singled out Clinton, saying she and the Democrats "have it wrong on illegal immigration." But he also left open the possibility he may target Giuliani's record in follow-up ads.

"There may be a time when there's more contrast in ads, positions between myself and others, but at this stage, I'm just trying to make sure people know what my positions are and perhaps down the road, we'll get a better chance to do that," Romney said.

In a statement, the Giuliani campaign highlighted the former mayor's anti-crime record. Giuliani himself has said that he discouraged rounding up illegal immigrants so they would feel free to report crime, which contributed to the city's safety improvement.

Giuliani aides also suggested that at least three Massachusetts cities offered sanctuary to illegals while Romney was governor.

"Romney's being a hypocrite on this issue," said a statement from Somerville, Mass., Mayor Joseph Curtatone, who lives in one such city. "I did not receive any mandate, any communication, anything at all from him about this. If it's so important to him, why didn't he have the State Police enforcing it?"

The Clinton campaign did not immediately respond to a request for comment.