There are only two people alive who have served as Democratic presidents of the United States, so it would seem only natural that the second of these men might have a kind word to say about the first.

But it takes some understanding of the long and often tangled history between Bill Clinton and Jimmy Carter to appreciate fully the praise that the president lavished on Carter this evening, and which Carter offered in return. Clinton flew here to award the Presidential Medal of Freedom, the nation's highest civilian honor, to both Jimmy Carter and his wife.

"Jimmy and Rosalynn Carter," said Clinton, "have done more good things for more people in more places than any other couple on the face of the Earth."

Carter, 74, pronounced himself "almost speechless" at the younger man's words, and saluted Clinton for his "global leadership, often under the most difficult circumstances."

The simple ceremony at the Carter Center may well have been the warmest moment in a relationship that stretches like a braid interwoven with threads of respect and resentment through a quarter-century of U.S. political history.

Carter and Clinton are both Southerners, both Baptists, both Democrats, both governors who vaulted from obscurity to the White House--two men with strikingly similar biographies but radically different personalities.

"One would have thought, looking at it abstractly, that they would have been the best of pals," said Mary E. King, an American University foreign policy specialist who has consulted and traveled frequently with Carter. The reality, she said, has been an "inexplicable frostiness" toward Carter, a "massive lost opportunity" for Clinton to use Carter's extensive expertise and relationships around the world.

Clinton, according to various current and former aides, has been exasperated by Carter but also fundamentally respects him. In particular, they said, he regards Carter's service-oriented career since leaving the White House as a model for the ex-presidency that awaits him in just 17 months.

Carter, say various associates, has felt irritated by what at times seemed like ostentatious efforts by Clinton's team to distance themselves from him--only rarely, and often reluctantly, finding a role for him on diplomatic issues where he has expertise.

Just last year, when the Monica Lewinsky scandal was in full fever, Carter said publicly that "as one of the very few leaders who served in the White House, I have deplored and been deeply embarrassed about what has occurred there."

The episode highlighted differences in style and values that long predated the scandal. Carter, say associates, is a rigidly pious man who views politics as a sometimes distasteful mission. Clinton, a man well acquainted with both sin and repentance, relishes politics as a wonderful game in its own right.

"Jimmy Carter is a public moralist" who viewed truth-telling as the highest obligation of a president, said University of New Orleans historian Douglas Brinkley, whose book "The Unfinished Presidency" documents Carter's post-White House career. "As people, they are like night and day."

Yet Clinton, for all the hesitation of his aides to admit it, is following a presidential model established by Carter. The Georgian was the first to challenge much of the liberal orthodoxy of 1960s Democrats, to embrace fiscal conservatism, and the first to talk about cultural values in ways that most traditional Democrats did not. But it took Clinton, with his superior fluency in politics, to make this style of presidency work.

Their relationship started promisingly enough. Clinton, then just 30 years old and secure in the knowledge that he had a virtual lock in his campaign for Arkansas attorney general in 1976, served as candidate Carter's state chairman that year and helped him win one of his most impressive vote margins in the South.

Flattering attention from Washington was his reward. There were White House invitations. There was a nice plum as well for the woman then still known simply as Hillary Rodham: appointment to the Legal Services Corp.

But things turned sour in 1980. Clinton blamed his loss in the Arkansas gubernatorial race--the only loss of his career--in significant measure on decisions made by the Carter White House. That was the year of a massive exodus of Cuban refugees, many of them with histories of crime and psychiatric illness. Some were housed in Arkansas at Fort Chaffee, where rioting broke out; things turned worse when the White House, in what Clinton took as betrayal, announced that refugees at a host of other sites would be moved there.

After the election, according to accounts of people who met with Clinton then, he fulminated over Carter's role in his defeat.

This may have seemed like ancient history by the time Clinton won the presidency. But undercurrents of grievance, fueled by a succession of real and imagined slights, flowed all through his first term.

Carter, according to people who have spoken with him about it, assumed that a Democratic president might pay him a special deference, particularly in areas of interest like promoting democracy and human rights abroad. Secretary of State Warren Christopher, after all, was a Carter friend.

It didn't happen.

Even so, with White House and State Department aides casting an anxious eye, Carter played a critical role in negotiating agreements with Haiti and North Korea.

After Carter's marathon Haiti diplomacy in 1994 led to an agreement for the voluntary departure of the dictatorship there just hours before a planned U.S. invasion, Clinton invited him to spend the night at the White House. Carter did but, according to a former Clinton aide, infuriated his host by getting up before dawn to take credit and to criticize the president in a morning TV interview. "There was a constant rubbing of each other" the wrong way, recalled the former aide.

But none of this came up tonight. Instead, Clinton brought along on Air Force One two of Carter's former aides--chief of staff Jack Watson and press secretary Jody Powell. He saluted Carter's work as president in the Middle East peace process and human rights. And he acknowledged the tireless efforts of both Carters since leaving the White House. They have traveled to 115 nations, monitored elections, fought poverty and promoted childhood immunization campaigns.

Carter acknowledged that good works sponsored by the Carter Center led to a personal rehabilitation after his reelection defeat caused him to leave Washington "in something of despair and embarrassment, and frustration." He said he looked forward to welcoming Clinton to the "small fraternity" of ex-presidents, but warned him that people would no longer be so forgiving of his mulligans on the golf course.

It was Rosalynn Carter who became the most emotional. She described visiting a Third World village where a farmer said with tears in his eyes that an agricultural program sponsored by the Carter Center allowed his children to return from the city to the farm. Her voice breaking, she turned to Clinton and said, "That's not work, Mr. President."

CAPTION: A mend in the road: President Clinton last night with honorees Jimmy and Rosalynn Carter.

CAPTION: Former president Jimmy Carter, finding plenty to smile about after being honored last night in Atlanta.