The lights will shine brightly on New York's theater district once again. Broadway producers and musicians have reached a tentative agreement, ending the strike that brought down the curtain on most Broadway musicals for four days.

The two sides reached a compromise after an all-night negotiating session at Gracie Mansion, the official residence of New York Mayor Michael Bloomberg. Mr. Bloomberg personally intervened in the dispute and called in an outside mediator. He announced the compromise after 12 hours of bargaining.

"There were two sides to a dispute and both of those sides understood that we have to live together and work together and that no dispute operates in a vacuum," said the mayor. "There are third parties that have to be considered as well."

Tourism officials say the four-day strike cost as much as $7 million in lost revenue to the theater industry and related businesses, such as hotels and restaurants. New York is still reeling from the September 11, 2001, attack on the city and an economic downturn on Wall Street, so a strike effecting New York's tourist industry took on added dimension.

The work stoppage centered on the minimum number of musicians required in Broadway theater orchestras - a long-time controversy between producers and musicians harkening back to the days when musicals with huge casts dominated Broadway. The required numbers of musicians vary according the the size of the theater.

Producers initially wanted to eliminate the requirement in the smallest theaters and reduce the number of musicians in the largest theaters from 26 or 24 musicians to 15. The compromise sets the minimum at the largest theaters at 18 or 19.

"This was an extremely difficult negotiation lasting over many, many meetings since last January," said Jed Bernstein, who represents the producers. "Neither side got everything it wanted. Neither side was able to get through this without making significant compromises and, ultimately, that is what a fair and good negotiation is all about.

Producers had planned to continue performances using pre-recorded music. But at the last minute before Friday evening performances, unions representing actors and stage hands told their members not to cross the musicians' picket lines in front of theaters, shutting down 18 musicals. Non-musicals and off-Broadway shows were not effected because they have separate contracts.

The musicians' union says producers want to replace musicians with computerized music. Union President Bill Moriarity says the new contract is a victory for musicians and audiences.

"Technology does not always win," he said. "And it did not win this time and while we have made some reductions in the house minimums, we have preserved 'live' Broadway and we continue to have the largest staff minimums in the world and we will continue to provide the best music that you will ever hear in your life."

The new contract is for four years, but the minimum requirement will last for the next decade.

The last Broadway strike in 1975, also called by musicians, lasted three weeks.