LONDON — Two days before it emerged that The News of the World had hacked the cellphone of a murdered schoolgirl, igniting a scandal that has shaken the media empire of Rupert Murdoch, his son James told friends that he thought the worst of the troubles were behind him. And he was confident that the News Corporation’s $12 billion bid for the satellite company British Sky Broadcasting would go through, according to a person present.

Now, with their most trusted lieutenant, Rebekah Brooks, arrested on suspicion of phone hacking and paying the police for information, the broadcasting bid abandoned, the 168-year-old News of the World shuttered, and nine others arrested, Rupert and James Murdoch are scheduled to face an enraged British Parliament on Tuesday.

It is a spectacle that Rupert Murdoch’s closest associates spent years trying to avoid.

Interviews with dozens of people involved in the hacking scandal, including current and former News Corporation employees, provide an inside view of how a small group of executives pursued strategies for years that had the effect of obscuring the extent of wrongdoing in the newsroom of The News of the World, Britain’s best-selling tabloid. And once the hacking scandal escalated, they scrambled in vain to quarantine the damage.

Evidence indicating that The News of the World paid the police for information was not handed over to the authorities for four years. Its parent company paid hefty sums to those who threatened legal action, on condition of silence. The tabloid continued to pay reporters and editors whose knowledge could prove embarrassing even after they were fired or arrested for hacking. A key editor’s computer equipment was destroyed, and e-mail evidence was lost. Internal advice to accept responsibility was ignored, former executives said.