Mitt Romney, Rick Perry Take Hits On Their Immigration Records (VIDEO)

WASHINGTON -- Mitt Romney defended his record on undocumented immigration during a Tuesday GOP presidential debate in Las Vegas, taking hits from Texas Gov. Rick Perry for twice hiring companies that employed undocumented immigrants.

"They're coming here because there is a magnet and a magnet is called jobs," Perry said. "And those people who hire illegals ought to be be penalized. ... You stood here in front of the American people and did not tell the truth that you had illegals working on your property. A newspaper brought it to your attention and you still, a year later, had those people working for you."

Republican presidential candidates have turned "magnet" into a dirty word, accusing each other of supporting policies that would encourage unauthorized immigration to the United States.

Perry attacked the former governor of Massachusetts for criticizing companies that hire undocumented immigrants despite once employing them. Romney used a landscaping company in 2006 that employed undocumented immigrants, then hired another company in 2007 that did the same.

Romney said he fired both companies when he discovered they employed undocumented immigrants -- particularly because he was running for office. He added that it can be difficult to tell whether contractors are hiring people with legal documents.

"We went to the company and said look, we can't have any illegals working on our property. I'm running for office, for Pete's sake," Romney said. "I can't have illegals."

Romney said Perry's policies as governor, particularly his decision to grant in-state tuition to some undocumented young people, proved he "did not pass muster" on tough immigration enforcement.

"When you were governor ... you put in place a magnet," Romney said. "You talk about magnets, you put in place a magnet to draw illegals into the state, which is giving $100 thousand of tuition credit to illegals that come into this country."

Perry has been repeatedly criticized by his opponents for signing a 2001 law that allows undocumented students to receive in-state tuition in the state's public universities, provided they attended at least three years of high school in Texas and are attempting to gain legal status. Perry declined to defend the policy, instead going on the attack. But he was later forced on the defense again, for stating in the past that he would not support a full fence along the southern border with Mexico.

While the other candidates called for a border fence to keep undocumented immigrants out, Perry again said that building a fence along the entire southern border is unrealistic because it would take too long and would be too expensive.

"You can build a fence, but it takes anywhere between 10 and 15 years and $30 billion," Perry said.

Herman Cain, the CEO of Godfather's Pizza, meanwhile defended his controversial statements on a border fence, passing up an opportunity to recant his "joke" that a border fence should be electrified to keep unauthorized immigrants from crossing the Mexico-United States border.

"I don't apologize at all for wanting to protect the American citizens and protect our agents on the border," Cain said.

Rep. Michele Bachmann (R-Minn.) took a slightly different tack, promising she would build a "double-walled fence" to keep immigrants from crossing the southern border and that she would make English the official language of the country.

The candidates threw around the word "illegals" liberally, but softened their tone when a Latino man stood to ask the candidates how they would appeal to Latino voters -- perhaps reminding them that they were in a state with the 12th largest Latino population in the country. Undocumented immigrants, though not exclusively Latinos, make up 7.2 percent of Nevada's population.

Although Latinos do not necessarily support undocumented immigration, a strong majority -- 79 percent -- oppose laws like Arizona's S.B. 1070 that crack down on unauthorized immigration, and even more support paths to citizenship for undocumented immigrants already in the country, according to a report from the Pew Hispanic Center.

And in Nevada, Latino voters hold major power in elections, particularly as the state's Latino population grows. Latinos are partially credited with keeping Democratic Sen. Harry Reid from losing his seat in 2010 to Republican immigration hawk Sharron Angle, who released multiple ads featuring menacing photos of Latino men depicted as dangerous criminals.

Perhaps with this in mind, Romney took a "step back" to bring up his support for legal immigration.

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