In a match that could be completed only after spectators had booed a veteran umpire from the chair, showering him with beer cans, paper cups and other debris, John McEnroe defeated Ilie Nastase at 12:35 a.m. today 6-4, 4-6, 6-3, 6-2, in the second round of the U.S. Open tennis championships.

Everyone knew that when McEnroe, the 20-year-old "Superbrat" from Douglaston, N.Y., played Nastase, the 33-year-old Romanian who has precipitated some of tennis's most tumultuous scenes, disorder was almost inevitable. But no one was quite prepared for the near-riot that took place shortly after midnight, and underscored the inability of part-time tennis officials to deal with petulant modern players and New York crowds.

After more than 2 1/2 hours of tennis that was occasionally brilliant, predominantly sloppy, and charged with a constant undercurrent of psychological warfare and stalling tactics, well-known umpire Frank Hammond of New York lost his temper and control of the match.

With McEnroe serving at 2-1, 15-0 in the fourth set -- long after the match had ceased to be comic and had turned ugly -- Hammond infuriated the evening crowd of 10,549 specators in the stadium of the National Tennis Center by penalizing Nastase a game for stalling and arguing.

Hammond earlier had lost his composure, ranted at Nastase, and docked him a penalty point in the third set, incurring the enmity of a crowd that generally supported the Romanian in his successful attempts to rattle the third-seeded McEnroe by playing foil to his angry outbursts.

After Hammond shouted "Game, McEnroe, prompting the scoreboard to show a 3-1 lead for McEnroe in the fourth set, the crowd showered boos on the umpire.

As Nastase stood at the base line, hands on hips as he cursed Hammond, the spectators kept up a steady stream of abuse and catcalls. Ironically, Hammond had been selected to umpire this match because of his reputation for being able to handle crowds and temperamental players. It was impossible for the match to continue amid the din.

Hammond, who seemed to think the raucous boos were being directed at Nastase rather than him, tried to default Nastase, but his announcement was muffled by the crowd's displeasure.

Tournament referee Mike Blanchard, who had sat at courtside as the match deteriorated into 15 minutes of mob rule, finally walked on court, climbed a ladder to reach the umpire's microphone, and scolded the crowd, threatening to suspend the match unless the spectators behaved.

"Ladies and gentlemen, attention please, it will be impossible to continue the match unless we quiet down a bit," Blanchard said, bringing on new choruses of boos. "If we are not able . . . may I have your attention please . . . Ladies and gentlemen, unless we have some quiet so the players can continue, this match will be discontinued until tomorrow."

Hammond tried to re-start play, but the crowd chanted "Two to one, two to one," calling for the game Hammond had penalized Nastase to be restored. Hammond was pelted with cups, beer cans and garbage.

Eventually it became evident that the match could not continue with Hammond in the chair, and tournament director Bill Talbert decided to have him removed. This decision brought about an intramural squabble among officials as to who had final authority in a Grand Prix tournament.

"What are our choices? Leave Frank in the chair and never finish the match?" Talbert said.

Finally, as the crowd resumed its change of "Two to one," the corpulent Hammond climbed down from his chair and referee Blanchard replaced him. After 20 minutes of raucous confusion perhaps unprecedented in tennis history, the match resumed. By this time Nastase was listless, and the match ended rather meekly, McEnroe breaking the Romanians serve for 4-1 and losing only one point in his last two service games.

The players, who ultimately were relegated to supporting roles as Hammond became the villain, shook hands at the end of the match, leaving officials squabbling. Hammond characterized the crowd by saying, "they're not tennis fans, they're jerks," and termed the episode "the most disgusting thing I've seen in 31 years in tennis."

McEnroe had said before the match that he expected Nastase to "try to bug me," and Nastase had promised he would. He did.

Nastase, the 1972 Open Champion who is now far past his prime, also produced some of his best tennis in several years to lead 4-6, 6-4, 2-0. He clearly had McEnroe disturbed by his clowning and stalling -- most of which made McEnroe look childish and foolish because it mocked his own slow play and incessant questioning of line calls.

The crowd was behind Nastase, riding hometown boy McEnroe, and this was clearly affecting McEnroe's play. But as has happened so often in his stormy career, Nastase carried his histrionics too far. He started to lose sympathy, and McEnroe tightened up his game and started to pull away.

Then in the fourth set, it was Hammond who lost his composure and let the match deteriorate into anarchy. The final 45 minutes of the fiasco left just about everyone involved looking foolish and incompetent. Afterwards, Blanchard, Talbert and Grand Prix Supervisor Frank Smith -- who had overruled Hammond's disqualification of Nastase -- all supported Hammond.

But Hammond, shaken and emotional, said early this morning that he was "resigning" as an umpire. "I'll make everybody happy," he said, "even if it means 32 years of service down the drain." McEnroe meanwhile seemed to speak for both players when he said, "the crowd just got out of control. I hope people realize it wasn't my fault."