Nine months, $15 million and some 300,000 air miles after it began, the Kennedy for President campaign was put to rest in just 90 seconds tonight.

"I'm a realist." Sen. Edward M. Kennedy told a disbelieving crowd of campaign workers in a brief, subdued statement at his hotel here. "My name will not be placed in nomination. . . ."

The Massachusets senator, like his brothers before him, had been a consistent winner in politics and was the presumptive winner of the 1980 presidential race when this contest started last fall. Tonight Ted Kennedy faced up to the reality of political defeat, and it was an uneasy coexistence.

When Kennedy entered the makeshift press room on the 18th floor of the Waldorf-Astoria Hotel tonight, he began his concession statement in the exaggerated tremolo he uses for the punch lines of his jokes.

"I am deeply gratified," he began, "by the support I received on the rules fight tonight -- but not quite as gratified as President Carter."

What was missing was the assurance that in the coming campaign he will support the man who trounced him. Kennedy was willing to recognize the inevitable and end his campaign, but he seemed determined to keep the Carter people in suspense about the unity pledge they want.

Kennedy's acknowledgment that his campaign was over was witnessed by the usual squadron of Kennedy family members, a few long-time friends and 150 or so campaign staffers. Just about all of them had known that this moment had to come, and they greeted the announcement in glum silence but with few tears.

Kennedy stood on a stage with his wife and his two oldest children, Kara and Teddy Jr. The third, 12-year-old Patrick, who was embarassed earlier in the year when he cried in public after some primary defeats, remained in the senator's hotel room.

Rep. Barbara Mikulski (D-Md.) her eyes red and runny, said the nominating speech she intended to deliver for Kennedy this week "will still be in style four years from now."

Kennedy called Mikulski after it was all over and told her that in addition to congratulating Carter, he had "reminded the president that [Kennedy] still stood for the same strong economic platform" he worked for during his campaign.

It all happened very quickly, Kennedy and his family strode into the room. With a serious look on his face, he read the statement. His wife and children smiled and applauded for just a second. Then they were gone.

Kennedy watched the balloting from his suite on the 16th floor of the Waldorf-Astoria and had a number of family members with him, including his wife, Joan, sister-in-law Ethel, sisters Pat Lawford and Jean Smith, and various Kennedy children. The group also included John Douglas, a Washington lawyer and longtime family friend, and staff members Robert Shrum, Carey Parker and Dick Drayne.

Earlier in the day, according to one of his aides, Kennedy had talked with the same group to discuss what type of statement he should make depending on how the vote on the "open" convention went. He apparently decided right after he lost that final test to proceed with his statement of withdrawal.

He called President Carter at 9.50 p.m., told him what he was going to do, and shortly afterwards made his brief statement.

Someone present at the meeting said Kennedy was in "good spirits . . . had been up the last few days . . . did not appear depressed . . . knew it was an uphill fight, and so he didn't have his head in his lap at the end."

While Carter's campaign chairman offered to negotiate -- all night if necessary -- to resolve the remaining platform differences, the Kennedy folks weren't interested. The staff went to a party.

Issues adviser Peter Edelman remarked acidly: "I'm standing here with a glass in my hand, and I'm not negotiating."

In a way, tonight's developments must have come as a relief. For weeks now Kennedy has been acting out a political fantasy, insisting publicly that he could win the nomination while conceding privately to his staff that things probably were over.

His unending back-and-forth with reporters had become a pain for both sides. On Sunday, during one of the exchanges when he was telling incredulous reporters that he could still win, Kennedy broke into a grin and said: "Come on, you guys, it's almost over."

And now it is.