On a promontory pointing to the sea, in the corner of America where much of the nation's history began, there unfolded this morning a political spectacle the likes of which even the old city of Boston has never seen.

The president of the United States and his prospective challenger, Sen. Edward M. Kennedy (D-Mass.) met in the presence of 7,000 of the Kennedy faithful to dedicate a permanent shrine to the memory of the two Kennedy brothers for whom pursuit of the presidency brought legend -- and death.

It was a gathering of the clan, a time of reminiscene of battles past and whispered conversations about the struggle soon to begin. It was a giant family picnic in the park on the edge of Dorchester Bay, but a picnic touched by moments of almost unbearable poignancy when the recorded voice of the slain president filled the air and the eldest son of the murdered senator spoke with his father's fervor of injustice in the world.

But nothing in the two hours of spine-tingling emotion was more stunning and surprising than the eloquence of President Carter, the stranger in the Kennedys' midst, who dedicated the library honoring John and Robert Kennedy with what may well have been the best speech of his presidency.

It was a speech that used John F. kennedy's own humor to twit Ted Kennedy's White House ambition, a speech that conveyed Carter's grief at the death of the president 16 years ago, a speech that talked sense to the nation about the difference between those days and these.

It was a speech that managed, without hitting a single note that could be called offensive to the occasion, to be the best brief Carter has ever delivered for himself as the adapter of the Kennedy traditions to the needs of these times.

And even after the aspiring, surviving senator had stirred the air with his own praise of his brothers, it was Jimmy Carter of whom the Kennedy crowd talked.

"He really rose to the occasion," said Adam Walinsky, Bob Kennedy's firebrand former aide.

"Carter was superb," added John F. Kerry, who had just quit his job as a prosecutor here to be available for Ted Kennedy's unannounced campaign. "I never knew he had it in him."

And on the MTA back to town, George O'Shea, a former state representative who had gone to Indiana for Bob Kennedy in 1968 and will do the same for Teddy, if asked, gave Carter the ultimate Boston tribute. "He showed me," O'Shea said to the son who was wearing his own PT109 tie clip, "a lot of class."

No one in this Kennedy crowd thought for a moment that Carter's eloquence would deflect Kennedy's apparent determination to challenge the president for renomination in next year's primaries and caucuses. But it gave them a fresh appreciation of what Kennedy may be up against in seeking to unseat the incumbent.

"It will be an exciting campaign -- hard and tough," said former senator John Tunney of California, Kennedy's college roommate. "Kennedy seems to bring out the best in Carter, doesn't he?" asked Bill Hadded, a New Yorker active for both the Kennedy brothers.

For many in the crowd, the prospect of a Carter-Kennedy clash has its own practical and emotional complications. John Rendon, an old Kennedy hand from Massachusetts, came here today wearing the president's button, fresh from a key role in handling the draft-Kennedy forces a beating in the Florida caucuses.

But Pat Lucey, who resigned as governor of Wisconsin to become Carter's ambassador to Mexico, was telling friends he'd be into the Kennedy campaign as soon as he makes his diplomatic farewells and gets back to Madison.

Pat Brown, the old governor of California, always an admirer but never an ally of the Kennedy brothers in their nomination fights, was here saying that a Carter-Kennedy battle makes it "hard to raise money" for his son, Gov. Edmund G. (Jerry) Brown Jr., a presidential hopeful in his own right. "It's a shame," Pat Brown said, "because he's making sense in his speeches for the first time, and now nobody's paying any attention."

Brown was not the only troubled Californian. Jess Unruh, the state treasurer, who tried in vain to wrestle the delegation away from Pat Brown for John Kennedy in 1960, and who was standing next to Robert Kennedy when he was shot in 1968, was telling anyone who would commiserate, "I'm committed to Carter and I'll have to stick. I got no early signals he [Kennedy] was going, and six months ago, it looked like Jerry [Brown] would be a threat, so I signed up with Carter. It's all right, I think," he said, sounding unconvinced. "I don't want anything from anyone anymore, and I think Ted understands."

Most of the Kennedy workers have moved up in the world to the point that their own prosperity and power do not depend on Ted Kennedy becoming president. Their conspicuous material success is what gave ironic point to young Joe Kennedy's hell-raising speech, calling for some of his father's, Robert Kennedy's, "moral courage" to be unleashed against "the vested interests . . . that are picking our bones clean."

But there were also the walking wounded in the crowd, men like Jerry Bruno, the super-advance man who planned the tragic motorcade in Dallas, and lives now, with his memories, in Chapel Hill, N.C.

His thoughts, and those of the others in the crowd, were private. But the emotions of those on the platform were visible to everyone. Ted and Joan Kennedy and Jimmy and Rosalynn Carter were centerstage, side by side, locked in a tension so acute it could be felt. Few words were exchanged among the four, until Carter had finished his speech and returned to his seat, between Joan and Rosalynn. Both women, and the senator, had watched him, rapt, while he described his prayers and tears on the day John Kennedy was murdered.

In the instant between Carter's turning from the podium at the end of his address, and Ted Kennedy's reaching it to begin his own response, an efficient security aide reached up and removed the presidential seal from the lectern. The swiftness of the gesture seemed to emphasize the ephemeral and equivocal nature of the prize for which the two men are about to battle.

As Kennedy began talking, Carter suddenly reached out his right hand, and held the hand of Joan Kennedy, the troubled wife of his prospective challenger. She looked at him gratefully and squeezed his hand in turn.

A few minutes later, when John Kennedy's recorded words had brought tears to every eye, on stage and off, and the singing of "America The Beautiful" had finally broken the tension that had been building, the ceremony was over.