In the first 30 minutes of the final televised debate of the 1984 presidential campaign, Walter F. Mondale did everything he had hoped to do.

He portrayed himself as a tough, illusion-free leader who could repair the damage and "humiliation" the nation had suffered under a president who didn't really know what was going on.

But 60 minutes later, even though President Reagan was cut off in mid-anecdote in his closing statement, rambling on about time capsules and California coastal roads and the wonderful young people he has met while campaigning this year, he was still on course to a second term.

The turnaround for Reagan in the debate -- and perhaps in the campaign -- came 30 minutes into tonight's televised encounter in the Municipal Auditorium, when Henry Trewhitt of the Baltimore Sun asked the president bluntly if, at his age, he might lack the strength and stamina to see the nation through a lengthy international crisis.

This was the question that has clouded Reagan's reelection prospects -- overtly or implicitly -- since his faltering performance in the Louisville debate Oct. 7 raised the issue of age and mental competence into public discussion.

Reagan did not flinch. Instead, he did what he has done so often at crucial moments of his political career. He delivered the perfect rejoinder. Dismissing the notion that he could not stay in the White House situation room as long as he was needed, Reagan smiled and said, "I will not make age an issue. I will not exploit my opponent's youth and inexperience."

There was a huge laugh, in which Mondale joined. But it may well have been that the biggest barrier to Reagan's reelection was swept away in that moment.

Even though Mondale hammered again and again at Reagan's failure "to master what a president must," an obviously relieved Lee Atwater, deputy director of the Reagan-Bush campaign, said "the age issue has been settled once and for all."

"Reagan was better tonight," Democratic National Chairman Charles T. Manatt conceded. "We expected him to be."

The television network commentators, who had pronounced Reagan a clear loser in Louisville, hedged tonight -- most of them seeing Mondale as a winner on points but not by a wide margin.

Coming into the debate trailing by 9 to 25 points in the latest national polls, Mondale knew that he needed a clean knockout or a terribly shaky performance by Reagan to make this a race.

What he got instead were:

A largely unchallenged personal exoneration from the Republican campaign propaganda that he is squishy-soft on defense and naive about the communist threat. Reagan made only a faint stab at documenting those charges, which Mondale strongly rebutted.

A chance to contrast his passion for human rights and arms control with the president's explanation, which Reagan acknowledged was incorrect, of the CIA assassination handbook and his almost irrelevant defense of the shah of Iran.

And an opportunity to play the tough guy by saying he would never give the Soviets the "Star Wars" space-weapons technology that Reagan implied he would tender to them as an inducement for mutual reduction of offensive weapons.

But the final 60 minutes of the debate, in which these points were developed, contained little of the political drama and tension that had pervaded the Louisville debate. The sense of observers here was that Mondale probably had won in debating terms but that Reagan had sidestepped any real political damage -- largely by dispelling that age issue -- and perhaps with it, the question of competency.

Whether Mondale can sustain his campaign in the final two weeks on these issues seems problematical.

Mondale's managers hoped coming into the debate that he could "raise the stakes" in the campaign by convincing the skeptical that Reagan's policy direction and managerial looseness really could endanger world peace. But when they stood chatting amiably and exchanging smiles at the inconclusive end of their final meeting, it seemed doubtful that the mission had been accomplished.

Tonight's debate lost pace and interest after Reagan's big moment and, in the auditorium at least, there was a sense that somehow, the suspense had ended.

As in Louisville, Mondale started strong, turning an opening question on Central America into a broad assault on Reagan's competence in foreign policy.

As in Louisville, Reagan was initially bogged down in specific detail -- and, as he acknowledged a moment later, he got one crucial fact wrong.

The man who edited the controversial CIA handbook was not the agency's station chief in Nicaragua, the president said with some embarrassment just moments after he had so declared, but a "spook" outside its borders. There are not supposed to be such agents in Nicaragua.

That gaffe seemed to hobble Reagan a bit, as he went through a clearly scripted recital of Mondale's Senate votes against various weapons systems.

The rhetorical effect of this jab was so weak that Mondale drew the first applause of the night simply by telling Reagan, "I accept your commitment to peace, but I want you to accept my commitment to a strong defense."

Over and over in that first half hour, Mondale hammered at Reagan's responsibility for the deaths of U.S. servicemen in Lebanon, the repeated terrorist bombings of U.S. facilities and the administration's failure to carry out the threat of retaliation. The implicit message was that no one was running the store -- that the "buck stopped" nowhere near Reagan's desk.

Reagan was defensive enough at this point to say, almost plaintively, "I'm tempted to ask you Mondale what you would do."

But then he hit the age and stamina question out of sight, and the debate sank into 10 minutes of boredom, with both men reciting standard campaign boilerplate on the immigration issue.

Reagan reawakened the audience when Mondale, desperate for something to add to his previous recitation on the subject, made a comment that the federal budget deficits added to the economic problems of other countries -- including Mexico -- and therefore contributed to the immigration flow.

"I've heard the national debt blamed for a lot of things," Reagan replied, "but not for illegal immigration."

There followed the curious role reversal on "Star Wars" weapons, with Reagan offering the Soviets a gift that Mondale insisted he would never make, and the even more curious Reagan defense of the shah, a man he honored for his housing projects and for having "done our bidding and carried our load" without complaint.

But by that time, there was a sense that this debate was probably not the election-turning event that some had anticipated.

Mondale needed that turn tonight. Reagan did not. And in that sense, Reagan was probably the winner.