WASHINGTON (CNN) -- The Central Intelligence Agency hired the private security firm Blackwater USA in 2004 to work on a covert program aimed at targeting and potentially killing top al Qaeda leaders, according to a source familiar with the program.

CIA Director Leon Panetta canceled the covert program this year when he learned of its full scope.

The existence of the program, which began in 2001, came to light earlier this year when CIA Director Leon Panetta canceled the effort, but it is only now that Blackwater's involvement has become known.

That development was first reported Thursday in The New York Times.

The program was part of a broader effort inside the CIA to develop the capacity to conduct training, surveillance and possible covert operations overseas, according to the source. The program was outsourced to contractors to "put some distance" between the effort and the U.S. government.

By mid-2006, Blackwater's involvement in the program had ended, according to a U.S. official. Other contractors were brought in for other parts of the program, another source said.

The total program cost "millions," a U.S. official said. It is not known how much Blackwater was paid. The company -- now known as Xe -- did not return CNN's calls seeking comment.

"The program ebbed and flowed. There were different phases to it. There may have been different folks involved," the source said.

U.S. officials have previously acknowledged that Panetta canceled the entire program this year when he learned of its full scope. At the time of the cancellation, officials said, renewal of the program was being considered. At that point, it had been brought to the new CIA director's attention.

Panetta canceled the effort in part because Congress had not been notified about it, officials said. Also, some in the intelligence community were worried there could be a diplomatic disaster if contractors were caught performing such work in foreign countries.

Former CIA Director Michael Hayden, who ran the agency from 2006 to 2009, downplayed the program during a speaking engagement in Washington.

"This was not a very prominent thing during my time as director," Hayden said. "What you had were three separate efforts under three different directors to deal with an issue that everyone understood was a problem in a capacity that everyone agreed we should have."

A spokesman for the CIA would not comment on the details of the still-classified program.

"Director Panetta thought this effort should be briefed to Congress, and he did so," spokesman George Little said. "He also knew it hadn't been successful, so he ended it. Neither decision was difficult. This was clear and straightforward.

"Director Panetta did not tell the committees that the agency had misled the Congress or had broken the law. He decided that the time had come to brief Congress on a counterterrorism effort."

Blackwater's extensive involvement in U.S. operations overseas, particularly in Iraq, has been controversial. The Iraqi government says that in a shooting in September 2007, Blackwater security guards killed 17 Iraqi civilians. Blackwater says its employees were returning fire after they were attacked by armed insurgents, but an Iraqi investigation concluded that the guards randomly fired at civilians without provocation.

The incident led to the Iraqi government's refusal to renew the firm's operating license in the country when it expired in May.

Although it lost the Iraq contract, the company, which changed its name to Xe earlier this year, continued to get multimillion-dollar contracts from the U.S. government for work in Afghanistan.

All About Central Intelligence Agency • Leon Panetta • Blackwater USA