In the 10 days since the assassination of Egyptian President Anwar Sadat, Sudan has become the newest area of East-West confrontation in Africa. The United States has warned Libya and the Soviet Union that they risk retaliation if they meddle in the affairs of Egypt's southern neighbor.

Here in this languid Nile-side capital, however, diplomats and Sudanese citizens report that the increased arms package Washington is rushing to deliver is not designed to combat what they see as the principal threats to Sudanese stability -- the unraveling of its virtually bankrupt economy and domestic discord that can be exploited by Libya.

Ironically, some Western diplomats believe that one of the major dangers to the rule of President Jaafar Nimeri comes from the Reagan administration's own policy of pushing for tougher terms from the International Monetary Fund in bailing out Third World economies. The IMF is believed to be seeking an austerity program here that could produce explosive public discontent.

Such mundane concerns have not marked the flurry of statements that have come from Washington and Cairo since Sadat's death introduced a new element of uncertainty in the Middle East. In a series of saber-rattling interviews in Cairo, Nimeri raised the specter of a direct invasion by Libya, which he called a "cat's-paw" of the Soviet Union, and threatened a "preventive war" against Libya.

The United States has rushed to Nimeri's defense, saying it would speed up delivery of $100 million in arms aid in response to Libyan air attacks on border areas that started last month. U.S. military exercises are planned in Sudan for the first time next month.

The tone of American remarks suggested that the United States was drawing a line in the desert sands of Sudan, Africa's largest country, and telling Libyan leader Muammar Qaddafi and his Soviet backers that they had better not cross it.

The reality from this city at the confluence of the Blue Nile and the White Nile, the world's greatest river system, looks startlingly different to a recent arrival.

The Sudan's chronic troubles were given little notice by outsiders until the assassination of Sadat, Nimeri's closest ally. Now Nimeri is doing his utmost to shore up his military and get public expression of U.S. support against Libya.

"Nimeri is not shy about standing up to Qaddafi," a Western diplomat said. "That is an important reason why he's getting support from the U.S. He's willing to stand up and be counted."

"Of course, Nimeri is exaggerating," another diplomat said, adding that there was "certainly not" any chance of a large-scale Libyan invasion across the Chadian frontier. About 5,000 of Qaddafi's troops have been based in Chad since they helped to end a civil war in that neighboring Central African nation last year.

Sudan, on the edge of Arab and black Africa, accuses Qaddafi of financing a secret underground army and training Sudanese dissidents in Libya to overthrow Nimeri. Last month more than 10,000 persons were arrested after an abortive coup attempt with alleged Libyan involvement. Officials also charge that their oil-rich neighbor foments economic sabotage by pumping money into the country to distort prices and having agents buy up scarce food and destroy it to exacerbate shortages.

They recall that Qaddafi allegedly infiltrated dissidents into Khartoum in 1976 in a major coup attempt that was put down only after three days of street fighting in which hundreds were killed.

Most analysts think that Nimeri has strong backing within the military, which should be aided by the arrival of modern American equipment soon. They also feel that a popular uprising against Nimeri is unlikely to succeed unless he fails to get control of the economy.

One ambassador said the state of the economy is the main threat to the president. The government's foreign debt totals $3 billion, and a team from the International Monetary Fund arrived this week to hold talks on Sudan's request for $250 million in support funds urgently needed to cover balance-of-payments problems.

Imports are outrunning exports by about $1 billion a year and about 85 percent of the revenue from sales abroad must be used for fuel. Inflation is estimated at 50 percent, and there is an exodus of unemployed youth from the vast country almost a third the size of the United States.

The IMF is believed to be seeking a reduction in massive government subsidies, mainly on food and fuel, which could lead to unrest. After riots and strikes two years ago, Nimeri eased IMF-induced consumer price increases.

Some diplomats believe Nimeri's war-scare campaign is aimed partly at influencing the Reagan administration into making Sudan an exception to the IMF strictures.

In any case, since Sadat's assassination, the Reagan administration has chosen to emphasize the war threat rather than the other more singnificant problems.

Nimeri set the stage with a series of 27 international press interviews in Cairo after Sadat's funeral last Saturday.

In one of his more emotional outbursts, Nimeri told the Lebanese newspaper An Nahar: "It is possible defense could be best ensured by attack. I mean carrying the battle into Libya."

In rhetoric similar to Iran's Ayatollah Ruhollah Khomeini, the Moslem politician added: "It is not impossible to find me staging an operation inside Tripoli, because I want and love martyrdom. We do not shy away from death, but we search for it."

In other interviews he maintained that Libya was about to invade. Foreign correspondents have been flocking to Khartoum ever since looking for signs of the imminent invasion. Some came with images of Libya's 2,600 Soviet tanks rolling across the vast desert to Khartoum. One correspondent even claimed to have seen a plan under which the invasion would start next Wednesday.

Instead they found a capital where there seemed to be only slightly tighter security.

Most Sudanese have lost count of the numerous coup attempts, many minor, some serious, against Nimeri since he seized power in a military uprising in 1969. A conservative estimate would be 15.

A taxi driving through the gates along Nimeri's official residence yesterday was waved on without even a cursory check -- but Nimeri is reputed to sleep in a different place every night.

The Sudanese rhetoric, according to one Western diplomat, is "belligerent and blown out of proportion."

No envoy interviewed believed that a Libyan invasion was likely. "I think it's garbage," one said.

They agreed that a Sudanese invasion was even less likely, given the motley state of Khartoum's military equipment compared with the $12 billion in Soviet arms Libya is estimated to have more.

"There is nothing to invade," a military attache said of barren Darfour Province in western Sudan.

Fatah Tigani, head of Sudanese broadcasting and a close aide of Nimeri, said, however: "If they take five or six kilometers of our country, that's still an invasion."

Some anlysts think such an occupation might be just what Libya has in mind to embarrass Nimeri and show that his Army cannot protect the country's sovereignty.

As for a wider invasion, however, Libya's troops along the 650-mile Chadian-Sudanese border are more than 1,000 miles from home and their supply lines are already stretched without striking out toward Khartoum, more than 800 miles away. In addition, Egypt has pledged to come to Nimeri's aid in the event of a Libyan invasion.

Nimeri has given refuge in Western Sudan to the remnants of the forces of Chadian former defense minister Hissene Habre, who was defeated last year in the civil war against Libyan-supported President Goukouni Oueddei.

In the last month Libyan planes have crossed the border to bomb Habre's strongholds almost daily, according to Sudanese government reports. Fewer than 10 persons have been reported killed but the air raids are having a disruptive effect even if the impact is not felt in Khartoum.

With its air defenses in a woeful state since breaking off its Soviet military pipeline in the early 1970s, Sudan has not been able to prevent the air raids. One plane reportedly was shot down by Habre's guerrillas using a truck-mounted machine gun, and two others have crashed.

Diplomats and journalists have not been able to enter the remote area, which takes about a week to reach from Khartoum driving over rutted tracks. There are no flights or rail routes into the area.

The bulk of the U.S. military aid package, which should begin arriving in two months under the speeded-up schedule, will be air-defense equipment, American sources said. About two dozen American military technicians will be sent to Sudan on temporary duty to train Sudanese to operate the equipment.

U.S. officials were careful to point out that the men are technicians, not "advisers," but they acknowledge that some will be sent to the embattled area to help install the weapons.

Sudan is also supposed to get "two or three" F5 fighters and some M60 tanks, although $100 million will not stretch far.

It is understood that this is just the beginning of a long-term U.S. plan to upgrade Sudan's military. The $100 million is "a drop in the bucket" compared with Libya's armada of more than 100 advanced Soviet Migs and French Mirages and 2,600 Soviet tanks, a Western military attache said.