Sen. John McCain (R-Ariz.) endorsed Iraq War veteran Tom Cotton's (R) Arkansas House campaign Thursday, putting him at odds with former Arkansas Gov. Mike Huckabee (R), who is backing Beth Anne Rankin (R), Cotton's primary opponent.

"Tom Cotton volunteered to fight for our freedom in Iraq and Afghanistan when he could have continued a promising legal career,"  McCain said in a statement. "We badly need this kind of courage and selfless service in Congress — particularly to address our economic challenges."

McCain and Huckabee faced off in the 2008 GOP presidential race, and are known to have a cordial relationship.

Cotton and Raknin are squaring off in a Republican-leaning district left open by retiring Rep. Mike Ross (D-Ark.). Cotton is a hard-line fiscal conservative with a Harvard Law degree who has the backing of the fiscally conservative Club for Growth. Rankin, a former beauty queen who worked for Huckabee while he was governor and lost to Ross in 2010, is viewed as more of a social conservative.

Arkansas's primary is less than three weeks away, on May 22.