In a heated rivalry like that between the New York Yankees and Boston Red Sox, NBC and CBS have just wrapped up their preseasons for selling advertising during their upcoming prime-time lineups, each betting its superstars will propel it to the top spot while leaving everyone else scrambling for third place.

Each year in May, the television networks preview their prime-time programs for advertisers and sell most of the commercial slots available in the fall and spring seasons. And at the end of the two- to three-week process, called the upfronts, each network adds up its totals, thumps its chest and claims some kind of victory.

The broadcast networks continue to feel pressure from their cable rivals, many of which reported higher ad sales for the upcoming season. Still, the six major networks said they had sold about $9 billion worth of advertising so far, roughly matching what they had sold at this time last year, which was a record year for ad sales.

The networks reported increased spending on ads by the telecommunications and financial services sectors this year, with sales flat or down in snack and packaged goods, a phenomenon that some ad experts said may have its roots in changing dietary habits.

As it has for the past several years, General Electric Co.-owned NBC banked the most revenue at this year's upfronts, with $2.9 billion in ad sales. It maintained its top position despite the sign-offs of reliable earners "Friends" and "Frasier."

"Our prime time was able to hold on to the dominant share" of revenue, said Randel A. Falco, NBC Universal Television Networks Group president. "We got 32 percent of all the money in prime time without 'Friends' and 'Frasier.' "

CBS claimed victory, too, this year. The Viacom Inc.-owned network said it was able to raise its rates more than any other network. With shows such as "60 Minutes" and the "CSI" series, CBS was able to charge 9 to 10 percent more this year than last.

"We didn't have a lot of holes to fill in our schedule," said JoAnn Ross, head of sales for CBS. "We have clear hits in 'CSI' and 'CSI: Miami,' and if you're a client looking at a schedule and not buying [the new show] 'CSI: New York,' that's crazy."

The rest of the networks -- the ones that had neither the top dollar totals nor the highest price-per-ad gains -- tried to put the best face on their results, insisting they did better than last year or they did great for their size or they didn't do as badly as they might have. That's Fox, ABC, UPN and the WB, which are banking on new shows such as "Desperate Housewives" (ABC), "The Missy Elliott Project" (UPN) and "Commando Nanny" (WB).

This year's upfronts were launched the week of May 17, when the networks previewed their 2004-05 lineups. The networks typically sell about 75 to 85 percent of all available commercial slots for next season, known as their inventory, and leave the rest open for last-minute buys, for which they can charge more. Most networks held back more of their inventory this year than last, which is why overall sales remained essentially flat or inched up even as each network experienced price increases.

A number of cable channels, such as NBC's Bravo, also reported bringing in increased ad revenue during this year's sale. And even though cable channels have been chipping away at network ratings in recent years, the networks still deliver a broader audience.

"In the law of unintended consequences, the more fragmented the media landscape becomes, the more integral network TV ironically becomes as the last bastion of national reach," said John Rash, a media buyer with Campbell Mithun, an advertising and marketing firm. "Accordingly, they are able to defy gravity by procuring higher [prices] despite lower ratings," a phenomenon Rash said will not continue indefinitely.

NBC experienced a rebound in advertising from the telecommunications and financial services sector, Falco said, and motion picture advertising -- particularly related to DVD releases -- was up sharply.

The one sector down appreciably was packaged goods -- represented by companies such as General Mills Inc., Procter & Gamble Co., Nestle SA and Kraft Foods Inc. -- that typically account for 10 to 15 percent of a network's total ad revenue, Falco said. He attributed some of the loss to the sector moving its advertising to cable, where ads go for one-third the cost of network ads, and for flat financial performance at some of the top companies.

But Falco had another theory: "I think some of it has to do with the Atkins [diet] craze," which has eaten into the high-carbohydrate products produced by the companies. Some companies dispute that contention. General Mills, for instance, spent the same on television advertising this year as last but just isn't advertising as much during network prime-time series.

For the past few years, CBS has been making ratings gains on top-ranked NBC. CBS executives believed this was the year the network could overtake NBC among young viewers and, if not win more overall advertising dollars than NBC, hike up prices more, which it did. NBC was able to increase its ad prices 6 to 7 percent.

Feeling itself in the driver's seat, CBS dragged out the sales period longer than last year, seeking top dollar from advertisers.

"I guess you could say we held up the process," CBS's Ross said, "or I guess you could say we hung in there and got the right price."

News Corp.-owned Fox maintained its overall sales total from last year, at $1.6 billion, while Walt Disney Co.'s ABC saw its take slip from $1.7 billion to $1.5 billion this year. The news could have been worse for ABC, which has lagged in fourth place in the ratings all year. The embattled network, which has struggled to find a hit since "Who Wants to Be a Millionaire?" in 2000, fired two of its top three executives in April and promoted Stephen McPherson from Disney's Touchstone television production unit in an effort to reverse ABC's fortunes.

NBC reported growth in its cable properties, with 20 percent revenue gains at USA and Sci Fi and a 100 percent gain at Bravo, Falco said, home of last year's hit "Queer Eye for the Straight Guy."

Viacom's UPN showed a sizable overall gain, securing CBS-like price increases of 9 to 10 percent and increasing its overall sales from $250 million last year to $350 million this year. The network's fall shows were generally well-received by television critics.

At the WB, the Time Warner Inc.-owned network that features youth-oriented shows such as "Gilmore Girls," upfront ad sales were off by about $25 million this year, owing to a drop in the network's ratings compared with the 2003-04 season. Yesterday, WB chief executive Jordan Levin left the company.

New fall shows include CBS's "CSI: New York" with Melina Kanakaredes and Gary Sinise, NBC's "Father of the Pride," with the voice of John Goodman, and UPN's "Kevin Hill," with Taye Diggs, standing.