A stunned Hollywood contemplated the end of an era today as two of the longest-serving studio heads in the industry, Robert Daly and Terry Semel, announced they were stepping down as the chairmen of Warner Bros.

"As a result of all our many hours of shared thinking and discussion, we concluded that now is the right time for us to move on," the co-CEOs said in a joint statement that explained little about their motivation. "In deciding to move on, we realized that if ever there were an appropriate time . . . that time is now."

The announcement was even more unexpected since it came on the eve of the release of one of the studio's most important movies of the year, Stanley Kubrick's "Eyes Wide Shut" with Tom Cruise and Nicole Kidman, which opens tomorrow. Both moguls had attended the film's star-studded premiere in Westwood Tuesday night, neither one hinting at the decision to step down after 20 years.

Daly, 62, and Semel, 56--so close they often drive to and from work together--have had one of the most successful partnerships in Hollywood history, running the legendary studio through a long streak of blockbusters in the 1980s and 1990s, including "Batman," "Lethal Weapon" and nearly all of Clint Eastwood's movies. They became known in the industry for matching big-name stars to big-budget action films that played well domestically and overseas, and then spinning those films into franchises for sequels, video and consumer product sales.

But the formula that worked so well for almost a decade and a half faltered in the past few years, and for a while it seemed as if Warner Bros. couldn't adapt to a radically changed marketplace. As the cost of movie stars and marketing soared and other studios focused on providing a fragmented audience with niche and art-house movies, Warner continued to make one expensive dud after another--among them "The Postman," "Sphere" and "U.S. Marshals." Finally the studio heads announced they would scale back the number and size of their productions.

"I think it was just a matter of whether they want to continue. Look at what the business has become; the economics of the business is so difficult right now, it's changed a lot in the past five years," said Anita Busch, editor of the Hollywood Reporter, which broke the story ahead of the joint statement. "It's more and more difficult each year. I think they just want a different challenge."

In recent months the studio had finally regained some momentum with hits like "Analyze This" and "The Matrix," a science fiction epic by a pair of sibling directors in their twenties. But this summer's blockbuster, "Wild Wild West," so far looks to be a disappointment if not a total bust. Some reports put the movie's budget as high as $180 million; so far it has taken in $82 million in the United States after two weeks in theaters. (Typically, half the box office goes to theater owners, half to the studio.)

Still, other aspects of Warner's business have performed well recently, including music, the fledgling WB television network and consumer products. A second-quarter report this week showed that Time Warner's film unit (which includes Turner Broadcasting's New Line studio) performed better than analysts had predicted, with profits of $593 million, compared with $101 million the same period a year earlier.

Insiders at Warner Bros. said Daly and Semel had been thinking about leaving since beginning negotiations for contract renewals a month ago. Time Warner Chairman Gerald Levin flew to Los Angeles to try to persuade them to sign on for another five-year stint, and Daly and Semel agreed to think about the issue while each went on vacation. The friends and partners linked up last weekend at producer Joel Silver's wedding in Florence, Italy, and on the flight back together on Sunday apparently sealed their decision to leave. They informed Levin Wednesday night.

In their statement, Daly and Semel said they would stay through the end of the year to ensure a smooth transition. One possible successor is the current head of movie production, Lorenzo di Bonaventura, who had reportedly been groomed to take over the studio. At the studio, though, executives were still too shell-shocked to think seriously about succession.

Said one executive: "I don't think 'shocked' is the word. I was stunned. Speechless, actually. . . . The reaction here is very mixed emotions. Everyone loves Bob and Terry--people are not here to work for a studio, they're here to work for Bob and Terry."

CAPTION: Warner Bros. chairmen and co-CEOs Robert Daly, left, and Terry Semel, shown at the premiere of "Eyes Wide Shut," say they are leaving the studio.