WASHINGTON -- Former CIA Director David Petraeus told lawmakers Friday that classified intelligence reports revealed that the deadly assault on the U.S. diplomatic mission in Libya was a terrorist attack.But he said the Obama administration refrained from saying it suspected that the perpetrators were al Qaeda affiliates and sympathizers to avoid tipping off the groups.Petraeus, who resigned last week after admitting to an extramarital affair, said the names of groups suspected in the attack were removed from the public explanation immediately after the assault to avoid alerting the militants that U.S. intelligence and law enforcement agencies were tracking them, lawmakers said.In his first public appearance since resigning, Petraeus testified before the House and Senate intelligence committees in back-to-back closed-door hearings.Lawmakers from both parties continued to wrestle with questions about the Obama administration's handling of the Sept. 11 attack in Benghazi and about why its public portrayal conflicted with the intelligence agencies' classified assessments."They knew right away that there were terrorists involved in the operation," said Rep. C.A. "Dutch" Ruppersberger of Maryland, the top Democrat on the House Intelligence Committee.The attack killed Ambassador Christopher Stevens and three other Americans.During his testimony, Petraeus expressed regret for his affair.Lawmakers did not ask him about it. In addition to what the administration knew about the assailants, they focused their questions on possible security lapses at the Benghazi compound.Sen. Marco Rubio, R-Fla., said Petraeus' testimony showed that "clearly the security measures were inadequate despite an overwhelming and growing amount of information that showed the area in Benghazi was dangerous, particularly on the night of Sept. 11."But many of the questions from lawmakers dealt with how the intelligence services and the administration overall responded to a request from the House committee for unclassified talking points about what happened, in advance of a closed briefing by Petraeus on Sept. 14, three days after the attack.The talking points initially drafted by the CIA attributed the attack to fighters with al Qaeda in the Islamic Maghreb and Ansar al-Shariah, a Libyan group with al Qaeda ties.Petraeus and other top CIA officials signed off on the draft and circulated it to other intelligence agencies, as well as the State Department and National Security Council.At some point in the process -- Petraeus told lawmakers he was not sure where -- objections were raised to naming the groups and the less specific word extremists was substituted."The fact is, the reference to al Qaeda was taken out somewhere along the line by someone outside the intelligence community," Rep. Peter King, R-N.Y., said after the House hearing."We need to find out who did it and why."After the hearings, administration officials disputed the notion that politics motivated the changes."There were legitimate intelligence and legal issues to consider, as is almost always the case when explaining classified assessments publicly," said a senior official familiar with the drafting of the talking points.