Astunning upset in the best comedy category, moving memorial tributes to Johnny Carson and Peter Jennings and several outbreaks of desperately needed comic relief helped make the 57th Annual Emmy Awards, telecast live from Los Angeles on CBS last night, one of the more nearly entertaining and least irritating Emmycasts in memory.

The upset occurred when the last Emmy was given out just before 11 p.m. -- a sentimental farewell Emmy to "Everybody Loves Raymond," the CBS sitcom that ended its nine-year run in the spring. It defeated the front-runner, ABC's "Desperate Housewives," which was the most talked-about new show of the 2004-05 TV season.

Emmys did go, however, to "Housewives" co-star Felicity Huffman and to Charles McDougall, who directed the controversial comedy's pilot episode. Wins by "Housewives" and the second most talked-about new show, "Lost," helped ABC to a total of six Emmys (of awards announced for the first time on the show), a close second to HBO, which usually dominates the competition and won seven Emmys.

CBS won five Emmys, Fox won two, and NBC -- currently the fourth-place network -- also won two. Other Emmys were scattered among such smaller networks as Showtime, Comedy Central (winning two for "The Daily Show With Jon Stewart," its only program of merit) and PBS (for a "Masterpiece Theatre" production, "The Lost Prince").

Ellen DeGeneres, who won high praise for hosting the delayed Emmys that aired after the tragic terrorist attack of Sept. 11, 2001, did another stellar job last night -- noting that she was working once again in the shadow of a catastrophe, this time Hurricane Katrina. She and some other participants wore magnolias in support of hurricane victims in New Orleans and other cities. In addition, there were repeated public service announcements asking for donations to Habitat for Humanity via the CBS Web site.

David Letterman, who has been averse to awards show appearances since flopping as host of the Oscars in the 1990s, made a rare Emmy visit to tumultuous applause and hosted a tribute to the late Johnny Carson, for nearly 30 years host of "The Tonight Show" and, said Letterman, "the biggest star in the history of television." Letterman came across as dour and desultory, however, suggesting he was anything but happy to be present on the Emmy stage.

The show's loudest and longest standing ovation went to Dan Rather, former anchor of "The CBS Evening News," and Tom Brokaw, former anchor of "NBC Nightly News," who said they'd hoped to be reunited with Peter Jennings, the "ABC World News Tonight" anchor who died last month of cancer. The segment became a tribute to the passing of an era, when Brokaw, Rather and Jennings were part of an American tradition and, said presenter Alan Alda, "anchors in more ways than one."

They represented a time of homogeneity and relative stability that is now fading fast into history. This was an emotional last great farewell. "Peter will have a place in this brotherhood forever," Brokaw said as part of the tribute to Jennings.

Pleas for hurricane relief presumably being nonpartisan and public-spirited, the Emmycast was devoid of the political statements by winners that have erupted in previous years with one exception: Blythe Danner, nominated in three categories and a winner for her role as a psychiatrist's mother in Showtime's "Huff," said of Iraq and the war being waged by American forces and a few allies, "Let's get the heck out of there."

The long evening's most endearing acceptance speech was probably the one given by S. Epatha Merkerson, a familiar presence to viewers of NBC's long-running hit "Law & Order" but a winner last night for her role in HBO's acclaimed movie "Lackawanna Blues." Merkerson, in a low-cut shimmering blue dress, said she'd made notes for a speech but that the paper had slipped down her cleavage when she stored it there.

"It's probably stuck to me," she said, making a few attempts to retrieve it -- finally giving up and saying to her viewing mother, "Ma, I lost it!" -- a statement with particular resonance coming from an actress on a stage in Hollywood.

Other entertaining highlights included a feature that DeGeneres called "Emmy Idol," after Fox's successful "American Idol" talent contest. Various artists popped up to sing a few classic theme songs from old TV shows -- most notably an amusingly countrified Donald Trump, in overalls and a straw hat, teamed with Megan Mullally of "Will & Grace" to sing the theme from "Green Acres." The show's star, Eddie Albert, seen in clips behind the singers, died earlier this year at the age of 99.

HBO's ambitious and unorthodox biographical film "The Life and Death of Peter Sellers" won Emmys for best actor Geoffrey Rush, who played the troubled and brilliant Sellers, for writers Stephen McFeely and Christopher Markus, and for director Stephen Hopkins, who said he was taking a break from rescue work in Baton Rouge.

Among the television academy's most curious and perverse choices for Emmy citations were Brad Garrett and Doris Roberts, supporting actor and actress on "Everybody Loves Raymond" and both multiple winners for previous years. Garrett's win meant a defeat for Jeremy Piven, who has given a dazzling performance in each episode of HBO's new comedy-drama "Entourage" and was a critical favorite to win.

The repeated Emmys to Roberts are simply baffling.

DeGeneres vanished for long portions of the program but then would materialize for a comedy bit. One of the most inspired was a great visual joke, DeGeneres interviewing Eva Longoria, the actress from "Housewives" who had not been nominated. In response to DeGeneres's questions, she said she had been treated just as royally as everyone else -- but then the camera pulled back to show she was seated in a stratospheric balcony, and a long pan showed viewers how far she was from the stage.

In contrast to all the gushing from winners about how "amazing" and "incredible" their co-workers and competitors were, Tony Shalhoub, winning for the second year in a row as best actor in a comedy for "Monk" (on the USA cable network), said of the other nominees in his category, "I'm not that familiar with their work." That, and such other highlights as William Shatner's participation in a re-creation of the famous "Star Trek" opening, helped make the 2005 Emmys unusually tolerable.

Winners at last night's 57th Annual Primetime Emmy Awards, presented by the Academy of Television Arts & Sciences:

Drama Series: "Lost," ABC.

Comedy Series: "Everybody Loves Raymond," CBS.

Miniseries: "The Lost Prince" ("Masterpiece Theatre"), PBS.

Variety, Music or Comedy Series: "The Daily Show With Jon Stewart," Comedy Central.

Made-for-TV Movie: "Warm Springs," HBO.

Reality-Competition Program: "The Amazing Race," CBS.

Actor, Drama Series: James Spader, "Boston Legal," ABC.

Actor, Comedy Series: Tony Shalhoub, "Monk," USA.

Actor, Miniseries or Movie: Geoffrey Rush, "The Life and Death of Peter Sellers," HBO.

Actress, Drama Series: Patricia Arquette, "Medium," NBC.

Actress, Comedy Series: Felicity Huffman, "Desperate Housewives," ABC.

Actress, Miniseries or Movie: S. Epatha Merkerson, "Lackawanna Blues," HBO.

Supporting Actor, Drama Series: William Shatner, "Boston Legal," ABC.

Supporting Actor, Comedy Series: Brad Garrett, "Everybody Loves Raymond," CBS.

Supporting Actor, Miniseries or Movie: Paul Newman, "Empire Falls," HBO.

Supporting Actress, Drama Series: Blythe Danner, "Huff," Showtime.

Supporting Actress, Comedy Series: Doris Roberts, "Everybody Loves Raymond," CBS.

Supporting Actress, Miniseries or Movie: Jane Alexander, "Warm Springs," HBO.

Individual Performance in a Variety or Music Program: Hugh Jackman, "The 58th Annual Tony Awards (2004)," CBS.

Directing for a Drama Series: "Lost: Pilot (Part 1 & Part 2)," ABC.

Directing for a Comedy Series: "Desperate Housewives: Pilot," ABC.

Directing for a Miniseries, Movie or Dramatic Special: "The Life and Death of Peter Sellers," HBO.

Directing for a Variety, Music or Comedy Program: "The Games of the XXVIII Olympiad -- Opening Ceremony," NBC.

Writing for a Drama Series: "House: Three Stories," Fox.

Writing for a Comedy Series: "Arrested Development: The Righteous Brothers," Fox.

Writing for a Miniseries, Movie or Dramatic Special: "The Life and Death of Peter Sellers," HBO.

Writing for a Variety, Music or Comedy Program: "The Daily Show With Jon Stewart," Comedy Central.

Come here, ya big lug: Clockwise from left, Jon Stewart hugs fellow Emmy winner Brad Garrett while Patricia Heaton holds Stewart's statue; Felicity Huffman accepts the award for comedy actress; and the cast and crew of "Lost" accepts the award for best drama. Emmy winner Felicity Huffman, above left, and her "Desperate Housewives" co-stars Marcia Cross, Teri Hatcher, Eva Longoria and Nicollette Sheridan at the awards ceremony. "Lackawanna Blues" star S. Epatha Merkerson, below, ad-libs her acceptance. Ellen DeGeneres, left, hosted the show.