In the afternoon of Jan. 9 - the last Monday of his life - Sen. Hubert Humphrey, in pajamas and robe, was sitting in the sunny den of his Waverly, Minn., home when the telephone rang. President Carter was on the line.

As Humphrey's cancer had weakened him in the five months since his final operation, Carter had been especially solicitous of the much-loved senior Democrat. Now he telephoned to talk about his just-completed overseas trip, the most important part of which was a meeting with President Anwar Sadat in Aswan.

In discussing the Middle East, Carter expressed frustration. Sadat had rejected an Israeli plan for keeping Jewish settlements in the Sinai, yet the government of Prime Minister Menachem Begin was strengthening and expanding these settlements even while peace talks were under way. This was certain to cause trouble.

Humphrey was also deeply concerned that the peace initiative set in motion by Sadat not slip away without results. According to David Gartner, his administrative assistant who wa sitting with him at the time, Humphrey asked Carter, "Is there anything I can do to help?"

The President replied that if Humphrey wished to take a hand, he might communicate his views to Begin. "I'll do it," was the reply - and he made it clear that he would do it with his own ideas and in his own way.

This was the beginning of the last of a lifetime public business for Hubert Humphrey: a personal plea to Israel, which he long had supported, for flexibility and restraint in the search for peace. His letter to Begin, completed and dispatched before he died, lived on in controversy after his death. Charges have arisen and were debated in Washington again in the past few weeks that the dying senator was "pressured" into a statement that did not convey his views by an administration at odds with Israel.

Interviews with Humphrey aides and friends produced consistent denials that the president or other officials exerted pressure to obtain the letter. "It was Humphrey's idea to do it, and he did it himself. Any implication that it was initiated by the Carter administration is just not accurate," said Gartner."This was Hubert Humphrey's letter, and he was very careful about it's phraseology," said Richard McCall, the legislative aide who assisted in the drafting.

Muriel Humphrey, who said she was "fully aware of the events" concerning her husband's final letter, said that "I find it very disturbing that efforts are being made by some to infer that the letter was drafted by others, did not fully represent his views or that he was not alert at the time. These charges simply are not true and do Hubert a great disservice."

Immediately after his conversation with Carter, Humphrey telephoned McCall, who was in Washington, and instructed him to draft a letter. He gave an outline of his view that if there was going to be a Mideast settlement, Israel as well as the Arab states would have to show some "give." And he explained, according to Gartner, that this message should be delivered "very tactfully." Begin had called on Humphrey in his apartment during the Israeli leader's Washington trip in mid-December and the senator, according to friends, was concerned that a blunt approach would not work.

McCall, who had worked on many documents for Humphrey, wrote the draft of the letter in Washington and telecopied it to the Minneapolis office Tuesday morning - the day after Carter's call - for delivery to Waverly.

Gartner, who was with the senator, said Humphrey went over the draft three times sitting in his living room. He felt the points were well taken but that it was "a little too strong" and should be toned down for greater effectiveness. McCall was instructed by telephone to revise the letter along lines specified by Humphrey.

Wednesday morning Secretary of State Cyrus R. Vance telephoned Humphrey Vance had just briefed a group of senators on the Middle East, a group that would have been led by Humphrey under other circumstances. Humphrey told Vance he was drafting a letter to Begin and explained the gist of it. Vance told aides later that he could tell from his voice and speech that Humphrey was fading.

A short time later McCall called to read the revised letter to the senator. Humphrey approved it and said it was just what he wanted to say. He instructed the aide to have the letter signed and delivered to the Israeli embassy for transmission to Begin. A copy was also to go to Vance for his information.

In Washington Wednesday afternoon the letter was sent to the Israeli embassy. About two hours later, according to McCall, he heard from Max Kampelman, a Washington attorney long close to Humphrey and one of his contact points with Israel and the American Jewish community. According to McCall and Gartner, Kampelman questioned whether Humphrey wanted to take the position of the letter, prodding Israel in gentle but unmistakable terms to greater "give" on the Sinai settlements and West Bank. Kampelman also had some suggestions on wording of several points in the letter. The aides assumed that Kampelman had been in contact with the Isareli embassy.

Kampelman later said that he had discussed the letter with Ambassador Simcha Dinitz, who was described as not particularly happy abou tit, and Kampelman confirmed that he had some suggestions on wording. he recalled, however, that he had heard about the letter earlier and had seen an early draft, and that Humphrey told him by telephone to communicate his views to McCall.

When Kampelman's suggestions were received Wednesday afternoon, it was too late to transact business with Hubert Humphrey. About midday Wednesday, he had begun visibly to sink, and was now in long periods of sleep with only intermittent minutes of consciousness. McCall and Gartener accepted two of Kampelman's suggestions, which did not change the meaning and would in their minds have been accepted by Humphrey. They declined to accept one suggestion, also of a minor nature, which they were not sure about. The letter was retyped, signed by a mechanical pen in Humphrey's office and sent in revised form to the Israeli embassy.

Two days later, on Jan 13, Hubert Humphrey died. More than a week after that someone generally believed to be a Carter administration official, passed along the news of the letter to The New York Times.

The Times published a brief account on Jan. 25 under the headline, "Humphrey Urged Israeli Flexibility." The following day the Israeli embassy protested that The Times's account did not reflect the "essence" and "spirit" of Humphrey's letter to Begin. Over the week the controversy grew from differences about the meaning of Humphrey's final political act to charges that Humphrey didn't write it and that the Carter administration had manipulated a dying man in a battle with the country he had usually supported.