In retrospect, it all seems so obvious. In a conservative time, Ted Kennedy was still an old-line liberal, a true believer in big government's ability to solve people's problems.

He was challenging the president just when Americans felt a patriotic duty to rally around their leader. He was a stumbling, often inarticulate candidate who could not live up to the superhuman ideal that Democrats associated with the name "Kennedy."

An ill-starred millionaire with an alcoholic wife, he had caused a fatal accident under questionable circumstances and explained it with a story that almost every American considered a lie.

Accordingly, hardly anyone was surprised last night when the end of the primary season left Edward M. Kennedy so far behind Jimmy Carter that the Democratic presidential contest seemed effectively over. It would now take an upheaval of revolutionary proportions to deny Carter renomination.

Yet in fact, Carter's apparent victory constitutes the major upset of this political year. When the race began last fall, Kennedy was the first choice among Democrats in every opinion poll -- as he had been in virtually every poll since 1970. And Carter's approval rating was lower than Ricahrd Nixon at his nadir.

Carter today still seems to evoke minimal enthusiasm. But in this year's primaries, Democrats nationwide have demonstrated that, whatever they think of Jimmy Carter, they think a lot less of Ted Kennedy.

Chappaquiddick and the other incidents that added up to Kennedy's "character" problem probably posed the major barrier to his success. But the enduring irony of the Kennedy campaign is that, in the end, the candidate turned the character issue back on itself.

Through all the reverses he experienced on his long campaign, Kennedy absolutely refused to cry or complain. The political story of the Kennedy campaign is that the "winner" in 10 years' worth of opinion polls turned out in the primaries to be a loser. But the human story is that he was a gutsy and gracious loser.

That first became clear last January after Jimmy Carter took 59 percent of the vote to Kennedy's 31 percent in the Iowa caucuses -- margin considered astonishing then, but one that became ordinary as the primary season wore on.

It was the first defeat of Kennedy's 18-year political career. He took it in stride. "We congratulate the president on his victory in Iowa," Kennedy said, and when it was suggested that Carter's big win meant Kennedy ought to quit the race, the loser managed to laugh. "Of course I intend to go on," he said. "Thirty-one percent of the people in Iowa can't be wrong."

Kennedy did go on, shrugging off fatigue and frustration and bouncing back with remarkable resilience after each new Tuesday night calamity. By the last weeks of his exhausting struggle, he seemed satisfied, even proud in the role of an underdog spokesman for the liberal cause.

But a member of the party's most successful family could hardly take pride in the results. Going into yesterday, Kennedy had entered 23 primaries and lost 18 of them. He competed in all 25 caucus states and lost 20. For the last six weeks, the question about Kennedy was no longer whether he would lose this contest, but rather when, and how badly.

Some people say that Kennedy effectively lost the 1980 race in July of 1969. There is no question that, for many voters, the Chappaquiddick incident rendered Kennedy permanently ineligible for the White House. Any pollster could find scores of people who said they considered a vote against Kennedy to be a vote for moral prinicples.

Yet Chappaquiddick was a basic part of American political lore all those 10 years that Edward Kennedy's name stood at the top in the opinion polls. And Chappaquiddick was hardly a forgotten subject among the prominent Democrats and professional politicians who pleaded with Kennedy to run for president in 1972, in 1976, and last year.So Chappaquiddick and "character" alone cannot explain Kennedy's failure.

Kennedy's rapid demise stemmed as well from the public's rapid recognition that he was not the superstar of political myth. His reputation as a tough, articulate, compelling campaigner dissipated with remarkable speed; the process began, in fact, a few days before he actually launched his campaign -- in the national televised and heavily ballyhooed interview with Roger Mudd of CBS News.

Kennedy himself had not wanted to do the Mudd program. He was not ready, he said, to discuss his candidacy in detail, and anyway, he wasn't sure it would do him any good. But his press secretary, Tom Southwick, pressed hard and convinced the senator that the broadcast could be a golden opportunity.

The result -- a stuttering, vacuous performance that portrayed a man who had no clear reason for running -- was a disaster from which the campaign never recovered. Southwick never did either. The dedicated young aide took personal blame for the Mudd fiasco, grew increasingly morose as the campaign sputtered, and eventually quit his job to go off to New Mexico and try to forget.

Kennedy's stump campaigning -- scrutinized with unusual intensity by the national press -- did little to offset the image Mudd's interview created. tFrom the first week of the campaign -- when Kennedy asked for support from "every farm family in Iowa" -- to the last -- when he declared" I am an uphill battle" -- his effort was plagued by flubs and slips of the tongue.

If Kennedy often seemed unable to say things clearly, it also seemed, in the first weeks, that he had almost nothing to say. This resulted from an initial strategic decision that Kennedy later admitted was dead wrong.

With Kennedy far ahead in the polls at the start, his advisers decided that it would be safest to tone down his liberal rhetoris so as not to offend a conservative electorate. Thus he began his run with a mushy stump speech that was heavy on abstractions -- "leadership," "hope," "the American spirit" -- but devoid of specific reasons for supporting Kennedy over the incumbent Democrat.

The most serious blow to Kennedy's hopes, though, came last Nov. 4 -- about 12 hours before the Mudd interview was broadcast -- when militant Iranians seized the U.S. hostages in Tehran.

Almost overnight the nation's attention was diverted from economic problems at home to the military and diplomatic crisis in the Mideast. And overnight there developed a compelling sense among the American people that a time of international conflict was a time to rally behind the president -- no matter how unpopular that president had been a month before.

Like all the other men who ran for Carter's job this year, Kennedy has been sorely frustrated by the Iranian crisis. He, too, supported the president's efforts to bring the hostages back -- he said so, in those first few weeks, in every speech. But he still wanted to talk about Carter's economic policies and the foreign policies that he felt had led to the hostage crisis. And now nobody wanted to listen.

Kennedy's frsutration finally boiled over in a late night television interview in San Francisco -- the last event of a tiring 14-hour campaign day. The shah had run "one of the most violent regimes in the history of mankind," he said and had "stolen . . . umpteen billions of dollars" from the Iranian people.

At a time when most other candidates had effectively taken a vow of silence on Iran. Kennedy's eruption became a major political event. To the questions people already had about his character and his political views were added doubts about his judgment.

There were a lot of Americans, of course, who had no doubts about Kennedy -- they knew quite clearly that they hated him.

As with his brothers, there was something about the man and his background that stirred intense dislike among a variety of constituencies. Thus Kennedy tended to make enemies even when he took the same stand his opponents did.

There was almost no difference between Kennedy and Carter on abortion, for example, but the anti-abortion movement focused its ire on Kennedy. "It's obvious that anti-abortionists want bogeyman Ted not just down but out before they start blasting" Carter, reported the anti-abortion journal, "Lifeletter."

Similarly, gun owners" groups spent heavily on anti-Kennedy advertising and bumper stickers ("If Kennedy Wins -- YOU LOSE!") even though his position was precisely the same as Carter's. A precisely the same as Carter's. A businessman from Columbus, Ohio, spent $7,500 from his own pocket to form an organization called "s.t.o.p." (stop Teddy on presidency). "I don't trust any politician, but mainly Kennedy," he explained.

Without all these problems, Kennedy might well have mounted a forceful, unstoppable campaign, Chappaquiddick or no Chappaquiddick. With them, he achieved one of the fastest nosedives in political history. In the October 1979 Gallup Poll, Kennedy led Carter by a 30 points; less than three months later, Kennedy trailed by 14 points in the same poll. And nothing he could do seemed to help.

And so Kennedy got clobbered in Iowa and settled into the distant second place he held through the rest of the campaign. But in a curious way, that big loss in Iowa was the best thing that happened to candidate Kennedy this year.

For one thing, his reaction to defeat -- his steadfast determination to keep going against terrible odds -- made him, if not a sympathetic figure, at least one whom many people could admire, regardless of political views -- an image that might help overcome the "character" issue in another election.

More important, Iowa liberated Kennedy.In a long strategy session after the voting there, Kennedy told his advisers that he might as well go back to the clear advocacy of the liberal cause that had been his family's political trademark.

The result, six days later, was the Georgetown University speech -- the most successful single speech of this political year. "I have only just begun to flight," Kennedy declared, and the new weapons he took up -- specific proposals for wage-price controls and for immediate gas rationing, and tough criticism of "helter-skelter militarism" in Carter's State of the Union address -- finally gave him a distinctive message to carry to the voters.

Kennedy seemed comfortable with his new message, but it was one that most voters did not seem to accept. The candidate would get furiously fired up before some crowd about food stamps or job programs or the idea he loved most of all, the need for a national health care system. Then the questions would start: "Won't that cost a lot of money?" "Won't that just mean more bureaucracy?"

Coupled with that distrust of government programs was a widespread sense -- nurtured, perhaps, by Carter's speeches about the limits of presidential power -- that the government's work would not change much no matter who was president. This idea, the notion that the presidential election didn't matter much, was the thing that bothered Kennedy most of all.

"Mr. Carter says there isn't much a president can do about these problems," Kennedy would shout at his campaign stops. "Well, I reject that idea. It is alien to everything I stand for and my family stands for." But the voters indicated they did not hold the president accountable for the nation's troubles.

Just before the Indiana primary, for example, Kennedy spent the better part of a weekend in the city of Anderson, an auto-industry community where the high interest rates that the Carter administration helped impose to fight inflation had led to a city-wide unemployment level above 25 percent. Kennedy campaigned hard among the union members of Anderson, and seemed to get a positive response. But on election day, Carter carried Anderson by a healthy margin.

The Kennedy campaign, which reached 39 states, Puerto Rico, Mexico and the United Nations, was a wearying whirlwind of 16-hour days and coast-to-coast flights. An ABC-TV crew that filmed Kennedy every time he arrived somewhere to make a speech counted up last weekend and found that they had shot that scene 2,150 times.

Tight security was standard operating procedure for a Kennedy campaign, but except for two egg-throwing incidents, from which the candidate escaped unsplattered, nothing happened.

It was also standard for the Kennedys to turn the campaign into a family effort, and at any given time a dozen or more Kennedys were likely to be out stumping. The surprise winner of the "best campaigner" title was the candidate's wife, Joan, who won respect and affection with her natural, amiable manner and her frank talk about her successful battle against alcoholism.

What was not standard for a Kennedy campaign was the long roster of defeats that the last brother suffered this year. Kennedy is the first member of his family to be rejected by the voters, and, judging from an interview with the candidate in the first week of his campaign, that must be painful.

"I think it has been advantageous to be a Kennedy," the candidate said at the very start of his campaign, when everything looked good. "My father, you know, set a high standard . . . that, you know, coming in first was important. And I think the advantage was the association with my brothers and my father . . . the disadvantage is the constant measurement to their very high standards.

"I hope I can run a campaign for the presidency that will measure up."