President Reagan and Walter F. Mondale clashed tonight over the federal budget deficit and the economy in a nationally televised debate that also highlighted sharply divergent views on abortion and the relationship between government and religion.

The first of two encounters between the two candidates was fought on ground both had been over before during the fall campaign, as Mondale sought to draw out Reagan on issues ranging from how he would reduce the deficit to whether he would again try to cut Social Security or Medicare.

Mondale said he had "stood up and told the American people" what he would do if elected and repeatedly challenged Reagan to do the same.

But Reagan reufsed. "I am running on the record. I think sometimes Mr. Mondale is running away from his," Reagan responded.

It was clear that both candidates had the 1980 debate between Reagan and then-President Jimmy Carter in mind and tried to use it to their best advantage. That produced the sharpest moment of the debate when Reagan, responding to a Mondale charge that he would raise taxes in a second term, repeated his famous 1980 line to Carter, "There you go again."

Mondale, who was clearly anticipating the line, fired back, "Remember the last time you said that?" Mondale, looking directly at Reagan, recalled how Reagan had promised not to cut Medicare in the 1980 debate but had proposed such sucts once in office.

"When you say "There you go again," people remember this," Mondale said.

Reagan responded that he had not proposed $20 billion in Medicare cuts as Mondale has asserted.

The 100-minute debate was sponsored by the League of Women Voters and held at the Kentucky Center for the Arts here. It was moderated by ABC News commentator Barbara Walters with the participation of three journalists who asked questions: James Wieghart of Scripps-Howard, Diane Sawyer of CBS News and Fred Barnes of the Baltimore Sun.

In their closing arguments, both candidates tried to draw the battle lines on which they hope voters will base their decisions 30 days from now. Mondale, repeating a phrase he used in a pivotal speech recently at George Washington University, said, "I would rather lose a campaign about decency than win a campaign about self interests," and attacked Reagan for "mean-spirited" cuts in Social Security and Medicare.

Reagan repreated his question of 1980, asking voters whether they were better off than they were four years ago and also whether "America is better off than it was four years ago." In both cases, he said, "I believe the answer . . . is yes."

Reagan was clearly irked by Mondale's repeated charges that he would cut Social Security if reelected, and at several points during the debate used his time to promise not to cut benefits for current beneficiaries. But Reagan accused the Democrats of demagoguery on the issue in the 1982 campaign and tried to shift the blame onto Mondale for Social Security tax increases since 1977.

The issues of abortion and religion cropped up repeatedly tonight. Reagan defended his frequent absence from church by saying it would create a security risk for others and adding, "I think the Lord understands."

On abortion, Mondale made an issue of the Republican Party platform, which calls for the appointment of judges who oppose abortion -- an idea championed by the Moral Majority leader, the Rev. Jerry Falwell.

The debate, which lasted 10 minutes longer than scheduled, offered viewers no major surprises and neither candidate appeared to make a fatal blunder but both tended to present facts selectively to make their points.

Mondale, who has persistently shied away from personal attacks on Reagan, tonight praised the president for lifting the morale and spirit of the country, but, quoting John F. Kennedy, said the country could be greater.

Reagan spent much of the evening defending himself, at times with obvious unease, on issues from the farm economy to budget cuts in programs for the elderly and poor. Mondale also brought up the three terrorist attacks on U.S. installations in Lebanon, saying that they underscored Reagan's lack of leadership.

White House officials were prepared for Mondale to come out swinging on this issue, but Reagan's only respond was that foreign policy issues are to be the subject of the Oct. 21 debate in Kansas City.

Neither candidate spent much time discussing civil rights, although Mondale made a reference to it in his closing statement. They hit the issue of defense spending only briefly, with Mondale pointedly bringing up the question of Pentagon waste and fraud as symbolized by the purchase of a coffee brewer for $7,4000.Reagan tried to deflect the criticism by saying it was his administration that had discovered the waste.

The most frequent topic of the debate was the federal budget deficit, through Reagan was quick to remind viewers of that pledge.

Reagan said he did not take seriously congressional projections of deficits reaching $263 billion by 1989 and believed that his policies have already set the country on the path to a balanced budget with continued economic expansion and budget-cutting.

But Mondale accused Reagan of ignoring reality and expecting the deficit to "disappear overnight."

The debate opened on the same issue, the deficit, and the running dispute between them over tax increases.

Reagan said he would try to balance the budget by continued economic growth. He said there is "no relation" between increasing taxes and balancing the budget, and attacked Mondale for what he said was the largest single tax increase in the nations' history.

Mondale, opening the debate by saying he respects the presidency, attacked Reagan for not keeping his promise to balance the budget by 1983, noting that the annual deficit has risen to $200 billion instead.

"I've stood up and told the American people it's a real problem," Mondale said of the deficits, criticizing Reagan for his proposed 1981 cuts in Social Security.

Reagan in response said he would "never stand for a reduction in Social Security" benefits for people now receiving them.

In the second question, Mondale was asked to defend his allegation that Reagan offers "salesmanship" instead of leadership." He responded by pouncing on Reagans's answer to the previous question about the federal deficit.

"The president says it will disappear overnight because of some reason no one else believes," he said.

Mondale also accused Reagan of failing to show "command" of the White House following last month's bombing of the U.S. Embassy annex in Beirut.

Reagan countered by saying he believed that the people -- and not government -- should "have control of their affairs to the greatest extent possible."

Reagan said that although he believed in accepting ultimate responsibility for his administration, "I don't believe that a leader should be spending his time in the Oval Office deciding who's going to play tennis in the White House court." That was a reference to former president Jimmy Certer, who reportedly did that at one point in his administration.

Reagan denied an accusation by Mondale that he had cut federally subsidized housing for senior citizens or that he would cut Social Security or Medicare in a second term.

The candidates then traded charges over the role of religion in politics and their personal lives.

Asked why he does not attend church, Reagan said it was because "I pose a threat to several hundred people" because of possible danger from terrorists. "I have gone regularly all my life," the president said. In fact, Reagan attended church regularly as a child but not as an adult.

Mondale attacked a plank in the Republican platform that calls for the appointment of judges who oppose abortion. He said Falwell had laid claim to "two justices" on the U.S. Supreme Court. Mondale complained that Republicans were trying to undermine private faith through government interference in such areas as school prayer.

Reagan said he wanted to preserve the constitutional wall between church and state but also did not want government to "hinder" a person's right to pray, such as a child who wanted to pray, such as a child who wanted to pray in a school cafeteria. Responding to Mondale's point about the Supreme Court, Reagan took note of his appointment of Sandra Day O'Connor as an associate justice.

Mondale got an opportunity to define his differences with Reagan when asked whether his party's policies have fallen out of favor with mainstream Americans.

"As you make the case, the American people will increasingly come to our cause," he said, after summarizing his views on arms control, foreign policy, civil rights and the environment.

Reagan was asked why he has not laid out specifics of his programs for the future on the campaign trail this fall. "I am running on the record," he said. "I think sometimes Mr. Mondale is running away from his."

Reagan went on to take credit for reducing the rate of increase in government spending, lowering inflation, reducing taxes, creating jobs and "refurbishing our national defense."

"All of the things I said I would do [during the 1980 campaign] . . . we have done, and I think the American people see that," Reagan said.

The president noted that he was once a Democrat but left when he saw that the party was moving in the wrong direction. But Mondale fired back on an issue that has angered him in the past, saying Reagan had abandoned the Democratic Party in 1960, when John F. Kennedy was running for president. Mondale said he was glad he had supported Kennedy over Richard M. Nixon that year.

Reagan later sought to set the record straight by noting that, although he had been active in "Democrats for Nixon" in 1960, he earlier had voted for Dwight D. Eisenhower but had not "gotten around to reregistering."

Mondale and Reagan differed sharply on the issue of abortion. Reagan said he believed that until it is proven that a fetus is not a human being, the unborn should be protected by the Constitution. "All the evidence so far comes down on the side of the unborn child being a little human being," Reagan said.

The president cited a California case in which he said a pregnant woman was beaten so severly that the fetus was stillborn; he said the state had later enacted a law making such an action murder and he asked why abortions should not also be murdered.

Mondale said a constitutional amendment against abortion that Reagan has supported would "make it a crime" for victims of rape and incest to have abortions.

"It cannot work, won't work and will lead to all kinds of cynical evasions of the law," he said. The Democratic nominee said wealthy women would continue to get abortions while poor women would resort to the "back alley" if such an amendment were passed.

Mondale warned against using what he called the "club of state" in the abortion issue and noted that Reagan had signed one of the nation's most liberal abortion laws as governor of California.

Mondale, quickly switching to farm issues, said he had opposed the grain embargo imposed by President Carter.

Reagan pledged, in strong terms, that he would not raise taxes in a second term, but he kept the door open by again saying he would raise them only as a last resort.

The candidate exchanged charges over whether the economic recovery had helped the poor, minorities and other disadvantaged Americans.

Reagan recited a litany-of-statistics that he said showed that the administration had not reduced benefits to the "truly needy" but had cut benefits only to those who didn't need them.

The president acknowledged that the recovery had been uneven, however, with some sectors of the economy rebounding more quickly than others.

Mondale, asked how he would approach the problem of helping the poor, endorsed one of Reagan's proposals, enterprise zones for urban areas, and called for deficit reduction and more education and job-training programs.

Mondale said Reagan had singled out for his budget cuts "the most vulnerable" people in U.S. society.

Reagan and Mondale again traded charges over the deficit. Reagan said there was no connection between high interest rates and eficits. Mondale insisted that there was -- and said Reagan's Council of Economic Advisers had told him so.

In the final round of questions, Mondale gave Reagan credit for raising the nation's spirit and morale, but said, "We need to move forward, not just congratulating ourselves but challenging ourselves" to improve the nation.

Mondale passed up the opportunity to say what he thought was the most "outrageous" statement Reagan had made during the campaign.

Reagan did not follow suit. Instead, he addressed Mondale's charges that he would cut Social Security, attaching "this continued discussion and claim that I am the villain that is going to pull the Social Security checks out from those who deserve them."

Such allegations "scare millions of senior citizens," Reagan said, adding that this had "nothing to do with balancing a budget or erasing or lowering a deficit."

Mondale said he wished Reagan had given more specific suggestions about how he would lower the budget deficit. Reagan responded that he has "talked in straight economic terms about a program of recovery" that is working, despite predictions of failure by some people.