Thousands of Cuban troops were reported headed to reinforce a major Ethiopian offensive yesterday that the Ethiopians claim has pushed Somali forces back toward their own border across the Ogaden Desert.

Western diplomatic sources in the Somali capital of Mogadishu said Soviet troopships carrying an estimated 3,000 to 6,000 Cubans were heading for Ethiopia's Red Sea port of Assab.

The new offensive, described by officials in the Ethiopian capital of Addis Ababa as a "concerted action . . . to drive the Somalis out of our territory," is the latest flare-up in the six month Ogaden war.

Recent heavy bombing and shelling of Somali positions were seen in Mogadishu as the prelude to a major Ethiopian ground offensive. Addis Ababa radio reported that Ethiopian troops have pushed Somali forces back from the key city of Harrar in the battleground area of the rugged Ambar Mountains.

In Mogadishu, senior Somali sources were quoted as saying the situation for the Somali rebels was "desperate." Somali officials issued a new appeal to the west for aid.

"It's no use," one high-ranking Somali official reportedly told a western ambassador. "It's the end."

In Washington, the State Department said the United States had rejected another Somali request for arms and had told Egypt and Israel that arming rival forces in the Ogaden conflict was "not useful."

The public admonition to both countries followed disclosures Monday that Egypt was actively backing Somalia and that Israel was selling military equipment to Ethiopia.

State Department spokesman Hodding Camer said an urgent Somali request for arms, conveyed by Egyptian President Anwar Sadat to President Carter during their Camp David talks last weekend, had been turned down. "The answer is "no," he said.

In recent weeks Somalia and Ethiopia have put out conflicting charges about foreign countries providing military aid and troops to the other, many of which have been regarded as exaggerated.

The State Department, however, has reported a consistent increase in the Soviet arms buildup in Ethiopia, now estimated at more than $800 million, and in the number of Cuban forces in the country. The latest estimate of Cubans is more than 3,000.

"Lately, it seems that reports out of Somalia about Cuban forces and the Soviet buildup appear to be self-fulfilling prophecies," a source said.

The Somali-backed Western Somalia Liberation Front said yesterday that its forces were retreating from several areas following the air and artillery barrage by Ethiopia.

Ethiopia denied that it planned to pursue its military initiative across the Somali border. Acting information Minister Baalu Girma said:

"All we want is to drive the Somalis out of our territory. We have to settle this question once and for all."

In Rome, an Ethiopian spokesman said the Soviet Union and Cuba have sent only about 100 military advisers and doctors and provided less than a million dollars in aid.

Carter said Monday that Cuban pilots are flying Soviet-supplied aircraft in Ethiopia and "we must allow for the possibility that they have been involved in the conflict."

Diplomatic sources in Addis Ababa estimated about 20,000 regular Ethiopian troops and more than 50,000 new militia are facing 25,000 to 30,000 Somalis on the Ugaden front.

The London Daily Telegraph said that according to one unconfirmed western estimate in Mogadishu yesterday, two weeks of intensive Ethiopian air strikes have killed 3,000 Somalis at the front lines.

As Ethiopian optimism mounted, Addis Ababa radio warned that the country's armed forces would have to prepare for a "long and ugly war. . . to free the oppressed Ethiopians of the Eritrean administrative region," referring to the fighting in the northern province of Eritrea where rebel forces are believed in control of 90 percent of the region.