A Republican is characterizing the libertarian-leaning Rep. Justin Amash (R-Mich.) as "Al Qaeda's best friend" in a new television ad because Amash voted to shut down the detention center at Guantanamo Bay and advocated ending the National Security Agency's blanket collection of phone records.

Businessman Brian Ellis, who is hoping to unseat Amash in Michigan's Aug. 5 primary, unveiled the ad Wednesday. It quotes Rep. Devin Nunes (R-Calif.), who made the Al Qaeda comments about Amash in an interview with Politico in May.

Nunes also told Politico that Amash isn’t a “serious member of Congress,” and called him “someone here playing games, and trying to be on the opposite side of Republicans," to justify the contributions he's made to Ellis' campaign.

“I will vote to keep terrorists locked up in Guantanamo Bay, allow American intelligence to monitor foreign terrorists plotting attacks, and support our veterans who sacrifice so much," Ellis said in a statement accompanying the ad's release. "Justin Amash’s votes to close Guantanamo Bay and stop monitoring foreign terrorists are dangerous and his votes against our veterans are shameful."

Given Ellis and Nunes' criteria, Al Qaeda has many close friends in Congress: 93 other Republicans voted with Amash on his amendment to end the bulk collection of phone records.

Ellis has his work cut out for him in Michigan's 3rd District. Recent polling shows Amash ahead by a wide margin, so the television ad represents a bid to shift attention to Amash's voting record.