ABC's baby-boomer series "thirtysomething" and "The Wonder Years" won Emmys as best dramatic and comedy shows, upsetting NBC and its highly touted "L.A. Law."

ABC won 21 awards Sunday, to CBS's 20 and NBC's 19. PBS won seven, syndicated shows won three and Home Box Office won three in the first year cable television participated in the awards."L.A. Law," the ensemble drama about the bad and beautiful in the legal profession, went into the show with the most nominations, 19, but lost its case with Television Academy of Arts and Sciences.

It won only two Emmys, for supporting actor - Larry Drake, for his sensitive portrayal of a retarded office assistant - and for editing.

In all, "thirtysomething" won four Emmys, including one for Patricia Wettig as best supporting actress and Paul Haggis and Marshall Herskovitz for writing. The show features a cast of baby boomers facing adult responsibilities.

"I suppose if there was another category for most annoying show on television we'd win that, too," said Ed Zwick, co-executive producer with Herskovitz. Backstage, Herskovitz said, "We really didn't expect to win."

"The Wonder Years," created by the husband-and-wife writing team of Neal Marlens and Carol Black, tells the story of the "thirtysomething" generation as they grew up in the 1960s.

It was also a good night for shows that will not return this fall.

Richard Kiley won for best lead actor in a drama series in NBC's canceled "A Year in the Life."

He thanked people on the show but added, "I have nothing but sadness for the corporate myopia that killed a fine show."

CBS's "Frank's Place," slated to return later, won three awards, including one to creator Hugh Wilson for writing and one to guest actress Beah Richards.

Tyne Daly of the canceled CBS series "Cagney & Lacey," won as best lead actress in a drama series.

Beatrice Arthur of "The Golden Girls" was named best lead actress and costar Estelle Getty as supporting actress for a comedy series. That made it a sweep for "The Golden Girls" cast. Rue McClanahan won as best lead actress last year and Betty White the year before.

John Larroquette captured his fourth straight Emmy as best supporting actor in a comedy series for his role as the lecherous prosecutor, Dan Fielding, in NBC's "Night Court."

"Now I am officially overwhelmed!" said Larroquette.

Michael J. Fox won his third consecutive award for NBC's "Family Ties." Later, as a presenter, Fox said, "I want to thank Dan Quayle for showing that Alex Keaton really can exist."

NBC's "The Murder of Mary Phagan," based on the lynching of Leo Frank in a murder case 75 years ago that stirred anti-Semitism in the South, won best miniseries. NBC's "Inherit the Wind" won as best drama or comedy special and CBS's "Irving Berlin's 100th Birthday Celebration" was best variety, music or comedy program.

Jason Robards was picked as best lead actor in a miniseries or special for NBC's "Inherit the Wind" and Jessica Tandy as best lead actress fo CBS' `Foxfire." Jane Seymour was named best supporting actress in a miniseries for ABC's "Onassis: The Richest Man in the World." John Shea won as best supporting actor in the ABC miniseries "Baby M."

The Emmy show, produced by Lorne Michaels of "Saturday Night Live," ran three hours and 21 minutes on Fox Broadcasting Co., much shorter than in past years.

"This show won't take itself too seriously," Michaels said.

To that end, it featured a "designated acceptor" for absent winners - actor Tony Danza. He was kept busy throughout the night as others winners were not present, and after a half-dozen walks to the stage, he cracked: "Now I'm mad; where are these people?"