Thousands of miles from the U.S-Mexico border, three Republicans vying for their party's nomination for U.S. Senate in Alaska clashed on immigration Sunday night in a televised debate ahead of the Aug. 19 primary.

Both former Alaska Attorney General Dan Sullivan and Lt. Gov Mead Treadwell refused to sign a pledge offered by tea party favorite Joe Miller to oppose all efforts at "amnesty" for people here illegally if elected to the U.S. Senate, with Treadwell chastising Miller for sending out a mailer on immigration featuring menacing Hispanic gang members. Miller, in turn, noted that several of Sullivan's backers, like GOP strategist Karl Rove, favor allowing many of the 11 million immigrants in the country to eventually become citizens.

"It's because it's the truth," Miller said when challenged about the pictures on the flier. "This is real-world stuff."

Miller, an attorney who won the 2010 Republican Senate nomination but lost to Sen. Lisa Murkowski when she bested him in a general election write-in campaign, has been increasingly emphasizing immigration as he tries to break out of what most observers believe is third place in the heated primary fight. He has been highlighting his support from Maricopa County, Arizona, Sheriff Joe Arpaio, a well-known immigration hardliner.

Miller was also the only one of the three candidates who refused to commit to endorsing the winner of the Republican primary. That will continue to stoke speculation that he could run on a third-party ticket should he lose the primary, which could effectively hand the November election to incumbent Democrat Sen. Mark Begich.

The candidates also clashed over the economic stimulus, gun rights and campaign spending. Sullivan has raised almost four times as much money as Treadwell and has a super PAC backing him, enabling him to bombard the airwaves with advertising. Begich and his super PAC have also jumped into the fight, attacking Sullivan over his roughly seven-year absence from the state, when he was in Washington, D.C., working in the administration of President George W. Bush and serving with the military overseas.

Republicans need to net six Senate seats to win control of the chamber in November. Sullivan stressed the need for the GOP to regain power in Washington, focusing, as befits his presumed front-runner status, on Begich rather than his primary foes.

"Our country is fundamentally going in the wrong direction," said Sullivan, who is also a lieutenant colonel in the Marine Reserves. "The best way to change this is to beat Mark Begich and retire Harry Reid."

Treadwell stressed his 40 years in Alaska and said Sullivan didn't have enough experience to win in November. "Dollars don't vote here in Alaska, people do," he said in a dig at Sullivan's financial backers, "and I ask you to remember that we can't be bought."

Sullivan chided Treadwell for sitting on the board of a company that sold equipment to the federal government for stimulus projects. Treadwell responded that there was nothing wrong with the business selling to the federal government and noted that the paint-supply company run by Sullivan's family also received contracts under the stimulus.

Miller, meanwhile, had a tone of bemusement, saying that Treadwell had adopted so many of his positions from his failed 2010 bid that he wondered if the lieutenant governor would show up with a beard, a reference to Miller's facial hair. He noted he was the only non-millionaire in the race and boasted of building his own house in the Alaskan interior and feeding his family with the fish he caught in the state's rich waters.

On immigration, all three candidates bashed the Obama administration for failing to secure the border. Treadwell said he supported letting some people here illegally stay once they pay a fine and wait for permits behind those who immigrated legally. Sullivan called for more border security.

Follow us on twitter.com/foxnewslatino
Like us at facebook.com/foxnewslatino