After a nearly three-month trial and a bizarre week capped by the disqualification of the jury foreman, NBC Universal on Friday settled a lawsuit with the creators of NBC's former hit sit-com "Will Grace." Strangely, the settlement came after the jury had reached a $49 million verdict against NBC.

Neither side knew the amount of the jury award at the time, because the judge had sealed that information as he weighed whether to disqualify the foreman for failing to disclose that he had taken a shot at the "corporate media," including NBC, on his website nearly two years ago.

"There have been a few twists and turns," said Henry Shields, a lawyer representing NBC. "This has been an unusual one."

Los Angeles County Superior Court Judge Warren L. Ettinger disqualified Dean Hartwell, a 38-year-old Glendale city employee, on Thursday, the day after the jury reached the verdict. That prompted the plaintiffs and defendants, both of whom worried there might be a mistrial, to hammer out a settlement agreement to end the trial that began in mid-January.

"We didn't know what the number was, but we had real concerns about whether this jury would last," said attorney Ronald Nessim, who represented the creators of "Will amp; Grace," David Kohan and Max Mutchnick, and their agent, Scott Schwartz.

The case began in December 2003 when Kohan and Mutchnick sued NBC Studios. They alleged that the studio &

which produced the series &

cheated them out of at least $65 million in profits by negotiating unfavorable terms for the broadcast rights, which the studio sold to its sister division, the NBC broadcast network.

NBC was, in effect, the buyer and the seller of the show, and the jury decided that NBC took advantage of that situation.

"We determined that there was fraud," said juror Robert Centrone, of South Pasadena. "It was some fancy Hollywood reporting versus the new kids on the block."

Added juror Rick Gonzales, of Montebello: "How do you make a determination of the fair market value when you are bidding against your boss? Let's be realistic, NBC and NBC Studios &

they were a monopoly."

NBC avoided its judgment day because on Wednesday, the night before the verdict was to be read in court, its lawyers were on a conference call. Someone asked who the jury foreman was, and someone else answered that it was Hartwell, who works as an administrative associate at Glendale's building and safety department.

One of the attorneys typed his name into Google and up popped a link to his Web site, which he calls "Dean Hartwell's Perspective on Current Events." The NBC legal team discovered a May 2005 essay titled "Corporate Media Favors Incumbents," which in the 12th paragraph includes one line complaining that NBC, among other media outfits, misses real political stories and covers "the phony ones."

"Total serendipity," said Shields, the NBC lawyer.

The NBC team worked through Wednesday night drafting a motion asking for Hartwell's ouster.

Hartwell, in an interview Friday, said he didn't remember that specific essay when he filled out the juror questionnaire in January, and so didn't mention it. The essay, he said, was one of more than 200 that he had written for his website, which more typically focuses on the Iraq War and the Bush Administration, both of which Hartwell opposes.

"I saw myself as a fair and impartial juror," Hartwell said. "I didn't have anything against NBC, NBC Studios or the plaintiffs." And during the trial and deliberations, he added, "I didn't say any negative things about NBC or any other corporation."