Abu Nidal, the Arab world's foremost terrorist, has moved his headquarters back to Baghdad after being expelled from the Iraqi capital four years ago.

Western diplomatic sources here and in Cairo said Abu Nidal returned to Baghdad in March, and Iraqi President Saddam Hussein confirmed his presence there this fall.

Why Saddam Hussein, who has been moving closer to the West and has shown signs of wanting to improve his relations with Washington, decided to let Abu Nidal come back is not clear.

But his decision seems likely to prove a major embarrassment to the Reagan administration, which moved on Feb. 26 to take Iraq off the list of nations supporting terrorism, thus permitting the resumption of trade cut off by the Carter administration. The move was blocked in May by the House Foreign Affairs Committee, but administration officials have continued to argue that Iraq has grown more moderate and has ended its support for international terrorists.

In an interview with a group of visiting British reporters Sept. 26, Saddam Hussein affirmed that his government still was opposed to terrorism and denied that Iraq was supporting operations carried out by the Abu Nidal group.

"Iraq has welcomed him Abu Nidal in Iraq on the premise that Iraq is the house of all the Arabs and all those who wish to reside in it," Saddam Hussein was quoted as saying.

"When our policy proceeds from welcoming all the Arabs, then it is natural that we welcome any struggler such as Abu Nidal when he comes to Iraq," he said. "Welcoming him, however, is one thing and encouraging him to carry out terrorist operations as a means to express his policy is another."

Since Abu Nidal's return to Baghdad, however, he has been tied to the attempted assassination of Shlomo Argov, the Israeli ambassador to London, in June.

In his Sept. 26 interview, Saddam Hussein said he had refused an offer to kill Israeli nuclear scientists in retaliation for operations carried out by the Israeli secret services against several Iraqi scientists. He did not disclose when the offer was made or who had suggested it.

"You will see in the future how we take Israel to account for its actions against the Iraqi nuclear scientists and for its raids against the Iraqi nuclear reactor," he told the British journalists, stressing that Iraq still reserved the right to reply to the June 1981 bombing of the Baghdad reactor "in the appropriate manner."

Abu Nidal, a 43-year-old Palestinian whose real name is Sabri Banna, had been based in Damascus ever since he was expelled from Baghdad in late 1978. He had fallen out with Saddam Hussein over Iraq's increased support for the Palestine Liberation Organization and its leader, Yasser Arafat.

Abu Nidal, a former official of Arafat's own Fatah group, had broken away from the PLO in 1972 with the avowed goal of destroying the organization and opposing any Arab or Palestinian move toward a reconciliaton with Israel. Fatah condemned him to death in absentia in 1978 after a series of attacks on PLO officials attributed to his lieutenants.

Since then, his name has been linked to a large number of assassination attempts on Arab and Palestinian diplomats as well as attacks on Israeli targets such as synagogues and diplomats in European capitals.

The attack on Argov in London June 3 was the pretext used by the Israeli government to launch its invasion into Lebanon three days later. Scotland Yard, which investigated the nearly successful assassination attempt on Argov, later said Abu Nidal's group was responsible for it, and Abu Nidal since has claimed responsibility for the attempt.

Argov is now in a rehabilitation center in Israel. He is said to have recovered all his intellectual facilities, but his physical recovery is still a question mark.

Abu Nidal also has been accused in Austria of plotting an attack on Chancellor Bruno Kreisky in retaliation for his role in encouraging the late president Anwar Sadat of Egypt to make peace with Israel and in urging the PLO to moderate its policy toward the Jewish state.

In August 1981, two Palestinians reportedly working for Abu Nidal were arrested at the Vienna airport after arms and explosives were found in their luggage. They, together with the PLO representative there, Ghazi Hussein, subsequently were deported.

In the past two months, there has been a spate of attempted assassinations of diplomats from Kuwait and the United Arab Emirates. Again, Abu Nidal's name has been linked to these operations, although no hard proof of his involvement has been made public.

One Western diplomat here who recently came from Baghdad noted that Kuwait and the Emirates were the two Persian Gulf Arab states that recently have been making peace overtures toward Iran and said one theory circulating in diplomatic circles there was that Iraq was using Abu Nidal to send a message to them.

In his interview with the British journalists, however, Saddam Hussein volunteered a disclaimer that Iraq had any role in the assassination of a Kuwaiti diplomat in Madrid Sept. 16.

Iraq, which has been at war with Iran for two years now, is heavily dependent financially on the gulf oil producers, which have loaned or given it more than $20 billion so far. But last spring the Kuwaiti parliament refused to approve a government request for another $2 billion loan, while Emirates ruler Sheik Zayed Nuhayan actively has sought to improve his relations with Iran as the tide of the war turned in its favor.

Abu Nidal has become a legendary terrorist figure in the Arab world in the past four years and has survived its ever-shifting politics with the same amazing skill as the man he hates the most, PLO Chairman Arafat.

The leaders of Syria and Iraq are bitter enemies vowed to cause each other's overthrow. Yet Abu Nidal has managed to get the support of both, albeit at different times, and to carry on his terrorist operations first from one capital and then the next.

He alternately has served Syrian policy interests when it was anti-PLO, and Iraqi ones when Baghdad was leading the so-called Rejectionist Front of radical Arab leaders opposed to any peace overtures toward Israel.

Observers here said Baghdad hardly could be displeased with the results of Abu Nidal's attempt to kill the Israeli ambassador in London, since that led to Israel's invasion of Lebanon, resulting in the battering of the Syrian Air Force and Army and in the eclipse of the Syrian hold over this country.

Whether it was done in this hope and expectation remains pure speculation.

According to Western diplomatic sources and even Syrian officials, Abu Nidal still maintains an office in Damascus -- even though he is living in Baghdad -- and is not barred from visiting the Syrian capital.

Saddam Hussein's decision to rehabilitate Abu Nidal less than a month after the Reagan administration made its conciliatory gesture and tried to take Iraq off the terrorist country list may have been pure coincidence and not meant as a slap at the United States. Indeed, the Iraqi leader has appeared as eager to improve his relations with Washington as it has with Baghdad.

But his action will not make an improvement in U.S.-Iraqi relations any easier, particularly after Abu Nidal publicly claimed responsibility for the attempt on Argov.