Rebekah Brooks, former News International chief executive, leaves the Central Criminal Court in London, on Tuesday.
, June 24, 2014. Former News of the World editor Andy Coulson was convicted of phone hacking Tuesday, but fellow editor Rebekah Brooks was acquitted after a monthslong trial centering on illegal activity at the heart of Rupert Murdoch’s newspaper empire. A jury at London’s Old Bailey unanimously found Coulson, the former spin doctor of British Prime Minister David Cameron, guilty of conspiring to intercept communications. Brooks was acquitted of that charge and of counts of bribing officials and obstructing police. The nearly eight-month trial was triggered by revelations that for years the News of the World used illegal eavesdropping to get stories, listening in on the voicemails of celebrities, politicians and even crime victims. (AP Photo/Lefteris Pitarakis)

LONDON — 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 shut down 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 after others at his paper faced earlier hacking convictions.

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 legal history — was triggered by revelations in 2011 about the scale of the News of the World’s illegal eavesdropping. That fact is not contested — several desk editors at the newspaper 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 newspaper for his scoop-gathering prowess.

Prosecutors argued that senior editors including Brooks — editor between 2000 and 2003 — and Coulson, who 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 with Mulcaire and others to eavesdrop on mobile-phone voicemails. The charge carries a maximum two-year jail sentence.

The jury of eight women and three men is still considering two further charges of paying police officers for royal phone directories against Coulson and former News of the World royal editor Clive Goodman.

Brooks was acquitted of that charge and of counts 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 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 employed Coulson after two News of the World employees were convicted of phone hacking in 2007.

The prime minister apologized Tuesday for his decision to give Coulson a second chance.

“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 trial was a vindication for Brooks, who was been the subject of a level of media fascination and online abuse that her lawyer called a “witch hunt.”

From humble origins in northern England, Brooks rose to become chief executive of Murdoch’s influential British newspaper division 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 court 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.

In the end, the jury was not convinced by the prosecution claim that she had known about phone hacking and other illegal behavior.

Standing in the dock at the back of the courtroom, 46-year-old Brooks mouthed “thank you” after she was cleared of all charges. She and her husband left court without speaking to reporters.

Both prosecution and defense accepted that the News of the World hacked phones on a substantial scale. Intercepting voicemails was a specialty of private investigator Mulcaire, who was briefly jailed in 2007, along with Goodman, for hacking the phones of royal aides.