The editor of the Daily Mail was aware the newspaper was using search agencies, but not the extent to which they were doing so, he told the inquiry into press standards today.
Paul Dacre, editor-in-chief of Associated Newspapers, which publishes the Daily Mail and the Mail on Sunday, told the Leveson Inquiry that using private detectives to access information used to be commonplace in the newspaper industry.
The inquiry has previously heard from Mail on Sunday editor Peter Wright that the paper continued using private detective Steve Whittamore for 18 months after he was raided in an investigation into the unlawful trade of personal information.
Whittamore was convicted of illegally accessing data in April 2005.
Mr Dacre, the longest-serving Fleet Street editor, said: "We wrote to Mr Whittamore and said could he give us an assurance that he was acting within the law."
He added: "In 2007 we brought the shutters down and absolutely banned the use of all these... of Whittamore inquiry agencies."
Mr Dacre said that "everybody, every newspaper" had been using Whittamore at one stage. He admitted that he was aware the Daily Mail had been using Whittamore before 2006.
He said: "We didn't realise what they were doing was illegal. There was a very hazy understanding of how the Data Protection Act worked and this was seen as a very quick way of obtaining phone numbers and addresses to corroborate stories."
The Information Commissioner's Office (ICO) uncovered a "treasure trove" of evidence linking newspapers to the sale of private data when it searched the Hampshire home of Steve Whittamore in March 2003, the inquiry has been told.
Mr Dacre said he was not sure an investigation into the Daily Mail's use of Whittamore was warranted at the time.
"We did not believe it was illegal. Our journalists were asking for information and I am not sure the implications of the Data Protection Act were understood at that stage."
He said reporters previously used phone directories and reverse telephone books, as well as tracking down births and deaths, in time-consuming ways, and then a new, quicker method emerged.
He was asked by counsel to the inquiry Robert Jay QC about his reaction to the ICO's report putting the Daily Mail top of the league of newspapers using Whittamore, with 958 transactions which were positively identified as illegal, involving 58 journalists.
"Obviously it brought things home to me," he said.
"Everybody was using this, law firms use them even now. Local authorities use them, insurance companies use them.
"We were trying to get addresses and phone numbers to corroborate news stories, to check the facts.
"We needed to get to the people in a family to check a story.
"This was a quick and easy way to get that information. Time is everything in journalism."
Mr Dacre also called for a new system of accrediting journalists to act as an "essential kite mark" for standards.
He told the Leveson Inquiry that "the existing press cards don't mean much".
Mr Dacre also argued that there should be a new self-regulatory body, standing alongside the Press Complaints Commission (PCC), to deal with press standards.
He said: "I do believe there is an opportunity to build on the existing haphazard press card system.
"There are 17 bodies at the moment providing these cards. By transforming it into an essential kite mark for ethical and proper journalism, the key would be to make the cards available only to members of print newsgathering organisations or magazines who have signed up to the new body and its code."
Mr Dacre suggested that journalists not carrying such a card would be barred from covering events such as key Government briefings or interviews relating to sporting fixtures.
He added: "The public at large would know the journalists carrying such cards are bona fide operators, committed to a set of standards and a body to whom complaints can be made."
He said journalists would then be at risk of having their cards removed, cancelled in a similar way to doctors who are struck off by the General Medical Council.
In his evidence to the inquiry, Mr Dacre said that the press was much better behaved and disciplined today than it was in the 1970s.
He added: "It is much improved than it was. I think there are areas where we can still improve things but by and large, I think they have improved to a much more acceptable level."
However, he said: "I think there are broader issues that the industry needs to look at. The problem of paparazzi, that worries me - I think we need to try and look at that."
Mr Dacre said he thought it was "a pity" that the News of the World had closed.
He told the inquiry: "I wouldn't have had the News of the World in my house but it did break great, great stories ... (with) a lot of serious political coverage in it, actually, that is no longer reaching its three or four million readers. I think that's a pity."
On the subject of private investigators, Mr Dacre said he had acted "decisively and ruthlessly" to stamp out the practice of using such information in 2007.
He told the inquiry: "This was 10 years ago and it was a system probably used by everybody.
"But from what we know now, I would accept that there was a prima facie case that Whittamore could have been acting illegally.
"I don't accept that this is evidence that our journalists were actively behaving illegally."
He added: "We didn't know then what we know now."
The editor said the Daily Mail "did more than any other paper" to put an end to the practice by banning the use of such agencies, writing the Data Protection Act into journalists' contracts and holding seminars on the issue.
He said: "What I want to stress is that I immediately acted with huge willpower and vigour to stamp out and change all this.
"Goodness knows, I don't know what more I could have done."
He added: "When you know that every other paper were doing it, I suppose one dropped one's guard slightly.
"All I am trying to tell you is when I did know the extent of it, I moved decisively and ruthlessly to stamp it out.
"Other newspapers did not and we did."
Mr Dacre defended a story about stabbed mother Abigail Witchalls in the Daily Mail.
Last week the mother of Ms Witchalls, who was left paralysed after being stabbed in front of her son in 2005, told the inquiry about media intrusion following the attack.
One example given by Baroness Hollins was an article in the Daily Mail in November 2005 linking Mrs Witchalls' attack to an assault suffered by her vulnerable brother some years earlier.
But Mr Dacre said: "To my mind this is a story and a feature handled with superb sensitivity."
He also defended Daily Mail columnist Jan Moir for a controversial opinion piece she wrote following the death of Boyzone singer Stephen Gately in 2009.
The article on the newspaper's website originally carried the headline, "Why there was nothing 'natural' about Stephen Gately's death", but it was later changed.
Thousands of complaints were made to the PCC about the article due to what Mr Jay referred to as "a cack-handed attempt to link this man's death, which was due to natural causes, to his particular lifestyle".
Mr Dacre said: "My view is that when the furore broke, perhaps the timing was a little regrettable.
"I think the piece, the column, could have benefited from a little judicious sub-editing."
He stressed however that "there is not a homophobic bone in Jan Moir's body".
The editor held up examples of other newspapers' coverage of the death which he claimed were "far more offensive".
Referring to the number of complaints attracted by the column, he added: "I think we had a viral storm. Most of these people conceded that they hadn't read the piece."
Asked if he had personally approved the piece before it was published, Mr Dacre said that while he is known for the amount of hours he spends in the office, on the night in question he was attending the opera with his wife.