LONDON (AP) — It was a simple trick — punching in passcodes to listen to messages left on other people's phones.
For years the illegal technique, known as phone hacking, helped Britain's News of the World tabloid get juicy stories about celebrities, politicians and royalty.
But the fallout eventually led to the shutdown of the country's best-selling newspaper, split Rupert Murdoch's powerful media empire and brought a storm of outrage down on the country's rambunctious press.
On Tuesday, the scandal brought a criminal conviction for former editor Andy Coulson on a charge of conspiring to hack phones — and an apology from Prime Minister David Cameron, who employed Coulson as his spin doctor.
Fellow News of the World editor Rebekah Brooks, a Murdoch protege who was the chief executive of his British newspaper operation, was acquitted of all charges, as were her husband and three other defendants.
The nearly eight-month trial — one of the longest and most expensive in British history — was triggered by disclosures in 2011 about the scale of the News of the World's illegal eavesdropping.
Several reporters and editors at the tabloid have pleaded guilty to hacking, as has private investigator Glenn Mulcaire, who was paid almost 100,000 pounds (now about $168,000) a year by the paper for his scoop-gathering prowess.
Prosecutors argued that senior figures such as Brooks, who was editor from 2000 to 2003, and Coulson, who was her deputy and then succeeded her, must have known about the practice, a claim both denied.
After deliberating for seven days, a jury at London's Old Bailey unanimously found 46-year-old Coulson guilty of conspiring to eavesdrop on mobile-phone voicemails. The charge carries a maximum two-year jail sentence.
The jury is still considering charges against Coulson and former News of the World royal editor Clive Goodman that they paid police officers for royal phone directories.
Brooks was acquitted of plotting to hack phones and of conspiring to bribe officials and obstruct a police investigation. The jury also found former News of the World managing editor Stuart Kuttner not guilty of phone hacking.
Brooks' husband, Charles, her former secretary Cheryl Carter and News International security chief Mark Hanna were all acquitted of conspiring to pervert the course of justice by attempting to hide files, computers and other potential evidence from police.
The hacking scandal exposed a complex web of ties binding Britain's political, media and police elite.
Add celebrity hacking victims who ranged from actors Jude Law and Sienna Miller to Prince William and Kate Middleton, and it's clear why one lawyer involved called it the "trial of the century" — and why Judge John Saunders told the jury that "British justice is on trial."
Coulson's guilty verdict reawakened accusations that British politicians were too close to Murdoch, whose newspapers were long said to hold the power to swing elections. Cameron hired Coulson after two News of the World employees were convicted of phone hacking in 2007.
The prime minister apologized Tuesday for giving Coulson a chance.
"It was the wrong decision and I am very clear about that," he said.
Labour Party leader Ed Miliband said Coulson's appointment tainted Cameron's government.
"He brought a criminal into the heart of Downing Street," Miliband said. "He put his relationship with Rupert Murdoch ahead of doing the right thing."
The verdict was vindication for Brooks, who was been the subject of such media fascination and online abuse that her lawyer called it a "witch hunt."
From humble origins in northern England, Brooks rose to become chief executive of Murdoch's British newspapers and a friend and neighbor of the prime minister, part of the horse-riding "Chipping Norton set," a reference to the tony town near her rural home. Friends included Cameron and former Prime Minister Tony Blair, who offered advice as the scandal erupted: "It will pass. Tough up."
In sometimes emotional testimony, Brooks described her "car crash" personal life, including her struggle to have a baby and her long affair with Coulson when both were married to others.
That affair formed a plank in prosecutors' case against Brooks — if Coulson knew about the hacking, they argued, she must have known, too.
But the jury was not convinced Brooks had known about the illegal activity.
The evidence against Coulson was stronger and included testimony from a former reporter, Dan Evans, that Coulson knew about hacking and other "dark arts" at the paper. Evans has pleaded guilty to hacking.
Standing in the dock, 46-year-old Brooks mouthed "thank you" after she was cleared of all charges. She and her husband left without speaking to reporters.
For several years Murdoch's company maintained the wrongdoing had been confined to Goodman and private investigator Mulcaire. That "rogue reporter" claim unraveled in 2011, when the Guardian newspaper revealed that the News of the World had intercepted the voice mails of Milly Dowler, a 13-year-old girl kidnapped and murdered in 2002.
In the furor that followed, Murdoch shut down the 168-year-old newspaper and police relaunched investigations into tabloid wrongdoing.
Dozens of journalists and officials have been arrested, some of them employees of newspapers not owned by Murdoch.
The cost to Murdoch's News Corp. has been enormous. The mogul split the company into two businesses, a publishing company and a media and entertainment group. The company has spent more than $500 million in settlements with hundreds of hacking victims, legal fees and other related costs.
Murdoch's British newspaper division, News U.K., said in a statement that it had already apologized and had "made changes in the way we do business to help ensure wrongdoing like this does not occur again."
The cost to Britain's tabloid press is still being measured. In the wake of the scandal, Cameron set up a judge-led inquiry into media ethics. The judge recommended creating a strong press watchdog backed by government regulation. Tougher regulation is being resisted by large segments of the press.
The tabloids still specialize in celebrity kiss-and-tells, but their revelations have seemed more muted since the scandal.
Hacking victim Miller, who testified during the trial about how her fling with James Bond star Daniel Craig had made News of the World headlines, told the television network ITV: "I feel like that kind of callous journalism has hopefully died down, and I'm really proud I played a part in that."
Several more trials over tabloid wrongdoing are still to come.
"We have to take stock of what this verdict tells us about the culture of one of the world's major media organizations," said Steven Barnett, professor of communications at the University of Westminster. "It tells us it was rotten."
Associated Press Writer Gregory Katz contributed to this report.
Follow Jill Lawless at http://Twitter.com/JillLawless