LONDON — It is a story made to order for the sensation-hungry tabloid newspapers that have millions of avid readers in Britain: a roll call of A-list celebrities and crime victims pouring out — day by day, live on the Internet — the personal miseries they say they have endured in seeking to protect the everyday normality of their private lives.

But this time, for the tabloids, it is a story with a bitter twist. For what is happening in a courtroom at the Royal Courts of Justice has amounted to a turning of the tables, through the medium of a government-appointed inquiry into the “culture, ethics and practices” of British newspapers, that has turned into a legal soap opera in which the villains have emerged as the tabloids themselves.

The high court judge leading the inquiry, Sir Brian Leveson, has called the sessions that began this week, relayed live on the inquiry’s Web site, a “right of reply” for victims of tabloid excesses. He has refused requests by the newspapers’ lawyers for the right to cross-examine the witnesses, and issued a formal warning to the mass-circulation papers not to strike back against those testifying with new articles that invade their privacy or damage their reputations.

One of those taking advantage of the platform was Sienna Miller, 29, a New York-born actress who lives much of the year in London and found herself a target of intense tabloid scrutiny when she was dating the actor Jude Law. One of the inquiry’s most arresting moments came on Thursday when she described her experiences with London’s “relentless” paparazzi, and described being spat at, verbally abused and subjected to dangerous car chases while trying to elude them.