06/06/2012 12:40 pm ET Updated Aug 06, 2012

White House: John McCain Allegation Of Classified Information Leak Is 'Grossly Irresponsible'

ABOARD AIR FORCE ONE -- The White House is denying claims from Republican Sen. John McCain that it orchestrated leaks of classified information to news organizations to boost President Barack Obama's national security reputation and re-election chances.

White House press secretary Jay Carney says any claim of leaks for political gain is "grossly irresponsible."

Referring to McCain by name, Carney says the Obama administration always takes proper precautions to prevent leaks of information that could harm ongoing counterterrorism or intelligence operations. He spoke to reporters traveling with Obama to the West Coast on Wednesday.

A day earlier, McCain had accused the Obama administration of selectively leaking classified data on a computer virus attack on Iran and CIA drone strikes.

Obama defeated McCain to win the presidency in 2008, and just days ago the president appeared to embrace the Arizona senator, propping him up as a model for a brand GOP leadership that had supposedly disappeared.

From the Associated Press:

To hear Obama tell it now, the McCain who ran against him in 2008 was an example of a principled Republican who knew how to reach across the aisle. The implication from Obama is that those qualities simply don't apply to Romney.

"John McCain believed in climate change," Obama told supporters at a fundraiser in Minneapolis Friday. "John believed in campaign finance reform. He believed in immigration reform. I mean, there were some areas where you saw some overlap. In this election, the Republican Party has moved in a fundamentally different direction."

In a later internet video, Obama also lauded his former rival for his tone in the 2008 election.

"As the Republican nominee, John McCain stood up to the voices of extremism in his party," the president says.