Heading into the last scheduled debate of the campaign on Sunday, Democratic challenger Walter F. Mondale has narrowed President Reagan's lead to 12 points in the latest Washington Post-ABC News poll.

The sampling of 1,505 registered voters, taken between last Friday and Tuesday nights, gave Reagan a 54-to-42 percent lead over Mondale.

A poll taken before the Oct. 7 Reagan-Mondale debate on domestic policy had shown Reagan with a 55-to-37 percent margin. A survey taken Oct. 8-9, in which respondents to an earlier poll were called back, showed that Mondale's strong performance in the Louisville debate had shaved the Reagan edge to 56 to 41 percent, and it has narrowed another 3 points since then.

As the president and his challenger settled in for briefings and rehearsals for Sunday's televised debate from Kansas City, the week's escalating rhetoric on both sides testified to the increasing stakes in that confrontation.

The hints of a gradual, but continuing, pro-Mondale trend in the wake of the Louisville debate impelled Reagan to step up his attacks on the former vice president this week and encouraged Mondale to keep the heat on the incumbent.

Although Mondale has gained on Reagan since the debate, his 12-point deficit is the widest gap at this point in the race since Richard M. Nixon's 23-point margin over George McGovern at a similar point in 1972. In 1980, Reagan had a 3-point lead over President Carter in mid-October; in 1976, Carter had a 6-point lead over President Ford, and in 1968, Nixon had an 8-point lead over Hubert H. Humphrey.

The latest poll indicates that Mondale has made no significant gains on the tax-and-deficit or Social Security issues, which figured prominently in the Louisville debate, or on the issue of Reagan's age, which burst into public discussion after the president's unexpectedly faltering performance in parts of that debate.

But as surveys taken immediately after the debate showed, Mondale did improve his own popularity and leadership image.

The new poll suggests that last Thursday's debate between Vice President Bush and his opponent, Rep. Geraldine A. Ferraro (D-N.Y.), was essentially a standoff, with 36 percent picking Bush as the winner and 31 percent naming Ferraro. The two are now so even in their overall popularity that their relative appeal does not seem likely to count heavily in the outcome.

What has happened in the last fortnight is that the tightening race has taken on an increasingly partisan hue. Reagan has the backing of 96 percent of the self-identified Republicans, while Mondale has boosted his share of the vote among his fellow-Democrats from 66 percent before Louisville to 75 percent in the latest poll.

Self-described independents who acknowledge a leaning to one or the other of the parties are splitting in proportions similar to the avowed partisans.

With only 4 percent of those surveyed professing to be undecided, the battleground for Sunday's televised debate is clearly the 30 percent of the voters who say they are less than "absolutely certain" of their candidate choice.

Among the "soft" Reagan voters -- those who are only fairly certain or not really certain at all of their preference -- half say that Sunday's foreign policy debate will count a great deal or a fair amount in their decision. A third of them are Democrats, a third of them now have a favorable opinion of Mondale and almost a third of these Reagan voters say they think Mondale would be more likely than Reagan to keep the United States out of war.

Those are clearly the voters whose allegiance Reagan sought to cement in the last few days by charging that Mondale's record was one of gutting national defense and underestimating the Soviet threat. And they are the voters Mondale started trying to pry loose by alleging that Reagan had only a "naive and primitive notion" of diplomacy and security policy.

Republican aides said that in addition to letting Reagan vent his personal disdain for Mondale before the debate -- where they hope the president will be upbeat and positive -- the recent attacks reflect their belief that Mondale's Senate voting record leaves him with a credibility problem as an advocate of a strong defense.

On the Mondale side, where there is equal eagerness to see their candidate take the offensive and raise the rhetorical stakes, there is a belief that by attacking Reagan's grasp of arms control and nuclear weapons issues, they can raise the broader issue of his competence as president.

So far, the age issue does not appear to be moving many votes. The share of those polled saying that Reagan, now 73, will be too old for a second term has increased from 27 percent in early September to 33 percent in the latest poll. As might be expected, the question itself is polarizing: More than six in 10 Mondale supporters say Reagan is too old, but only one in 10 Reagan backers agrees.

The poll shows that Mondale did not hold all of the immediate image gains from the Louisville debate and is still the least liked of the four national candidates.

His favorable-unfavorable scores bounced up from 41-to-49 percent negative before the debate to 54-to-43 percent positive immediately afterward.

The latest poll shows Mondale's rating 50-to-44 positive.

Reagan leads the field with a 60-to-36 percent positive rating, followed by Bush with 57-to-34 percent positive and Ferraro 54-to-37 percent positive.

Mondale pollster Peter D. Hart asserted yesterday that his nightly tracking polls showed a "definite improvement" for Mondale continuing on Monday and Tuesday nights.

Jim Lake, chief spokesman for the Reagan-Bush campaign, said its tracking showed "a pretty steady, almost constant" pattern of gains in Reagan's margin since last Thursday.