The Guardian's investigations editor told the Leveson inquiry into press standards on Tuesday that the use of subterfuge by journalists can be justified in exceptional circumstances if they are pursuing a story that is in the public interest.

David Leigh, an assistant editor at the paper with special responsibility for investigations, defended his decision to hack into messages left on a mobile phone belonging to a businessman in a successful attempt to stand up a story.

"I don't hack phones, normally," Leigh told the inquiry. "I've never done anything like that since and I've never done anything like that before. On that particular occasion this minor incident did seem to me to be perfectly ethical, yes."

Leigh revealed in a Guardian article published in 2006 how he had listened to voicemails after the businessman inadvertently left the pin number needed to access them on a printout. "All that was needed was to dial straight into his voicemail," he wrote.

"There is certainly a voyeuristic thrill in hearing another person's private messages. But unlike [former News of the World royal editor Clive] Goodman, I was not interested in witless tittle-tattle about the royal family. I was looking for evidence of bribery and corruption. And unlike the News of the World, I was not paying a private detective to routinely help me with circulation-boosting snippets."

Leigh told the inquiry he had been trying to initiate a debate about newspaper methods after Goodman had pleaded guilty to accessing voicemails on phones belonging to members of the royal household. Goodman was subsequently jailed.

"Journalists on public interest investigations have to use a certain amount of guile," he said, pointing out that reporters cannot arrest people, or compel individuals to appear before a court.

"We have to find out things often from powerful people who are anxious to conceal them," he added. "There are many powerful organisations in society who want to keep things quiet for their own reasons, and that includes newspaper corporations too."

Leigh said he had once pretended to be an arms dealer in a successful attempt to prove that Mark Thatcher had entered into a business deal with a Middle Eastern businessman. He argued that was also a legitimate technique because the story was in the public interest. That example was also published in his 2006 Guardian article.

"I don't think journalists should break the law," Leigh said. "I don't think they should break the criminal law, at any rate. Sometimes … we challenge the law and sometimes it's difficult to stay on the right side of the civil law, certainly."

Referring to the so-called "quality" press, Leigh said: "Most of the time we are extremely well-behaved. We do regulate ourselves. The tabloid press is incapable of self-regulation."

Leigh criticised the News of the World and the tabloid press in general. "The tittle-tattle [they publish] is being got illegally, intrusively and sometimes cruelly," he said.

"It does bring our trade into disrepute," Leigh added. "It's very upsetting; because they failed to clean up their act it makes it more difficult for people like me on serious newspapers to do worthwhile things."

However, he conceded that tabloid editors at papers like the News of the World, which closed in July, and the Daily Mail were under different pressures than their counterparts at the Financial Times or the Guardian.

The inquiry also heard on Tuesday from Charlotte Harris, who represents a number of phone-hacking claimants, including the football agent, Sky Andrew, and the former MP Mark Oaten.

Harris described how she had been placed under surveillance by News of the World owner News International. Harris claimed that Julian Pike, a lawyer at Farrer & Co, which worked for News International, had been involved in the decision to target her and fellow lawyer Mark Lewis.

"It's a little bit disconcerting to be sitting next to an apparently eminent lawyer in court and to find out that a year ago they had ordered some surveillance on you rather than write a letter," she said.

"If you have a concern, raise it with me, raise it with my law firm, raise it with the Law Society."