Haneef, who went back to India following his release, had spent four weeks behind bars in July after being charged with recklessly providing support to a terrorist organisation.
The charge was dropped as the then Director of Public Prosecutions, Damian Bugg, conceded there was insufficient evidence against him.
Keelty, in a yet to be published interview with The Bulletin magazine, said he had warned the DPP that the evidence against the Indian national was thin. "I was as surprised as anybody when the DPP advised that Haneef could be charged. Because I didn't think the evidence was strong enough," Keelty told the magazine.
Asked if he had told the DPP of his concerns, Keelty, the Australian Federal Police Commissioner replied: "Oh, yes."
"Mine was an opinion that I expressed to the DPP, but I understood all the time that the prosecutor was independent of me and independent of the investigation and needed to come up with a view for himself," he said.
Keelty admitted that the AFP had made errors in the Haneef matter, but none that compromised the case.
The DPP had admitted to placing two errors of fact before the court during the Indian doctor's bail hearing on July 16. One error concerned Haneef's residency in the UK, while the other occurred when prosecutor Clive Porritt wrongly said Haneef's sim card was found in the vehicle that crashed into Glasgow airport.