While confronting the United States off Libya's northern coast, Muammar Qaddafi has been maneuvering farther south to strengthen his military and political influence in Sudan, a country regarded as vital to U.S. interests in the Middle East.

The Sudanese government, the primary recipient of U.S. economic and military assistance in sub-Saharan Africa, earlier this month formally requested that Libya provide arms to help it fight rebels in the south of the country. The request was made by Sudanese Prime Minister Gizzuli Daffa-Allah, who traveled to Tripoli with his defense and foreign ministers to negotiate a military aid agreement.

As part of that agreement, two Libyan bombers reportedly have been used in air attacks against the rebel-held towns of Rumbek and Yirol in southern Sudan. The Sudanese People's Liberation Army, which controls much of the southern countryside, seized Yirol in January and Rumbek early in March and has threatened to mount a major offensive against the government.

Western diplomats in Khartoum said that the two Soviet-made Tupolev 22 bombers are on loan from Libya and are based north of the city. The bombers are the same type that the French government said was used by Libya in the bombing last month of the airport in Ndjamena, the capital of Chad.

In Washington, U.S. officials said the bombings apparently were intended as a prelude to a government counteroffensive against the rebel forces. According to unconfirmed reports from southern Sudan, government forces have been massing near Wau, a town about 150 miles northwest of Rumbek.

On Tuesday, the officials said, Sudan complained that neighboring Ethiopia, which supports the rebels, was violating its airspace by resupplying the rebel forces at Yirol, 50 miles east of Rumbek.

On the political front, a Sudanese-Libyan joint statement issued March 14, on Daffa-Allah's return from Tripoli, aligned Sudan with Libya's "legitimate defense" of its "sovereignty over the Gulf of Sidra." U.S. officials said that the Sudanese Cabinet reiterated its support of Qaddafi's claim to sovereignty over the gulf in Khartoum yesterday.

Senior western diplomats in Khartoum said in recent interviews that Libya has given major financial support to all the presidential candidates in next week's national elections. Last weekend, Sadiq Mahdi, who is seen by western observers as the leading candidate in the election, reportedly was in Tripoli for a meeting with Qaddafi.

In addition, diplomats in Khartoum said that in the past year scores of senior officials in the Sudanese government have been taken on VIP tours of Tripoli, where they were entertained in luxury hotels and guest houses. The Libyan government also has hired between 3,000 and 4,000 Sudanese nationals, ranging from former state security officials to teachers to cooks, and brought them to work in Libya, diplomats said.

Growing Libyan involvement during the past month in Sudanese military and political affairs comes after a yearlong campaign by Qaddafi to increase his influence in a politically fragile country that the United States has long regarded as a key buffer for Egypt and Saudi Arabia against Libyan adventurism.

The Reagan administration has requested more military and economic aid again this year for Sudan, $158 million, than for any other country in sub-Saharan Africa. In the past, U.S. military aid to Sudan -- which totaled $45 million in 1985 -- was intended to help the country defend itself from Libya.

The United States repeatedly has voiced concern over Sudan's new relationship with Qaddafi's government and last year warned Americans not to travel to Khartoum because of the danger of attack from Libyans who had come to the city.

The overthrow last April of president Jaafar Nimeri, a longtime enemy of Qaddafi, gave Libya its opening in Sudan. Libya quickly ended support for the rebel army, which it had supported against Nimeri. Qaddafi made a surprise four-hour trip to Khartoum last May, and a Libyan "people's bureau," or embassy, staffed by about 200 Libyan nationals, soon opened in the city.

Early this month, hundreds of Sudanese continued to line up outside the embassy in hopes of getting jobs in Tripoli.

Libya also began funneling aid into war-torn, debt-hobbled Sudan. According to western sources, Libya recently gave 2.2 million barrels of fuel, enough to stave off a fuel shortage that would have interfered with next week's elections, which are to return the country to civilian rule after a year under a transitional military government.

In an attempt to influence Sudanese politics, Libya reportedly budgeted $76 million to support Sudanese revolutionary committees that are supposed to promote the "Green Book" teachings of Qaddafi in Sudan. Western sources in Khartoum said the committees have recruited about 4,000 persons, most of them Sudanese exiles who returned last year from Libya after the coup.

The committees, however, have been plagued by violent internal conflicts. One of the senior leaders of the revolutionary committees, Abdullah Zakariya, who reportedly helped write the "Green Book," was kidnaped last year by rival committee members in a highly publicized intramural squabble that made the Libyans the subject of widespread derision in Khartoum.

Sudanese officials privately have criticized the Libyan-backed committees as heavy-handed interference in Sudan's internal affairs. Several committee leaders reportedly have been deported to Libya.

"The Libyans have squandered some of their opportunities for influence here," said a senior western diplomat. "Many of the members of the revolutionary committees behaved like juvenile delinquents."

Diplomats said, however, that the Khartoum government's need for arms in fighting the rebels, who control nearly a third of the country, is likely to ensure continuing Libyan influence in Sudan.