When they are not out fishing in the tepid waters of the Arabian Sea, the wizened men of this coastal village seem to spend much of their time sipping tea and swatting flies around the muddy square that passes for downtown.

Gwadar, a barren patch of earth and sand on the western Baluchistan coast, does not have much to offer visitors. There are no hotels and no tourist attractions to speak of.

But Gwadar has something that makes a powerful new neighbor envious: a natural deep warm-water harbor. The Soviet Union, having moved to Baluchistan's doorstep through its invasion of Afghanistan, is closer than ever to reaching that long-sought goal, one that has eluded the Russian czars and their Soviet successors.

If that prize were ever attained, a Soviet naval base here would enable Moscow to control the mouth of the West's oil lifeline, the Persian Gulf, and the strategic Strait of Hormuz 400 miles to the west.

The more immediate danger, as far as Pakistan is concerned, is that a Soviet-instigated rebellion in Baluchistan, long a hotbed of separatist sentiments, could wreck the country's fragile unity and lead to the establishment of a Soviet satellite or client state in Baluchistan.

Neither the authorities in Islamabad nor the militant Baluchis, who seek to unite fellow tribesmen in southern Afghanistan and southeastern Iran, have forgotten a little-reported but bloody guerrilla war in Pakistani Baluchistan. More than 3,000 government troops and at least 5,000 Baluchi guerrillas were killed during a four-year period.

The war began after former prime minister Zulfiqar Ali Bhutto clamped down on local automony demands in Baluchistan in early 1973. It ended in November 1977, when Gen. Mohammed Zia ul-Haq overthrew Bhutto and reached a truce with Baluchi leaders.

Although there has been no noticeable buildup of Pakistani forces here or elsewhere in Baluchistan since Moscow's intervention in Afghanistan, local authorities seem keenly aware of the potential Soviet menace.

"Of course we feel threatened," said an officer in Gwadar's martial-law administration. "With your enemy on your border, it's only natural to feel threatened."

A civilian official also representing the federal government said, "People here are very disturbed. We're Moslems and we're concerned about our Moslem brother in Afghanistan." He added, "The Russian invasion of Afghanistan means they are interested in getting to the warm waters."

The officials, who did not want to be named, denied that the Soviet invasion of Afghanistan is encouraging any Baluchi agitation against the central government. Nevertheless, there are signs that at least some Baluchis here do not agree with the official assessment and that the authorities are sensitive about any display of restiveness.

Five Western journalists who tried to tour Gwadar Tuesday were taken to the local martial-law headquarters and kept there for five hours under a polite form of detention, then put on the next plane for Karachi. The reporters were told the entire coastline is a "restricted area" off limits to foreigners, and that their visits had not been authorized by the government. A four-man British television crew was not permitted to film anything in or around Gwadar.

On many of the village's walls, anti-government slogans had been painted over.

Any attempt to question Baluchi residents of Gwadar about their living conditions and attitude toward the government was prohibited, but a brief conversation with a Baluchi student at the airstrip outside the town provided a hint of the trouble that may lie ahead.

"We don't like the government," the student confided. "There has been no progress, and the people don't have jobs." He echoed a familiar complaint -- that the federal government has neglected the development of Baluchistan in favor of other areas and has not built enough roads, schools, houses, health facilities and other amenities here.

The student said most young Baluchis are leftists who approve of the Soviet intervention in Afghanistan, while older inhabitants generally oppose it because of the perceived threat to Islam.

Asked which view he held, the student laughed nervously and said, "I can't tell you."

He said there was no fighting now between Baluchi separatists and the central government, but when asked whether he thought there might be clashes in the future, he whispered, "yes, of course."

The young Baluchi, who studies at Karachi University in the country's main port city 258 miles to the east, had come to the Gwadar airstrip to see off an uncle who was flying to Oman to serve in that country's armed forces.

Because of the lack of employment in the province and a shortage of manpower in Oman, the Omani Army recruits several hundred Baluchis a year from the Mekran Coastal Range to which Gwadar belongs. There are about 5,000 Baluchis in the Omani armed forces, according to estimates here.

Gwadar and the arid land in a 37-mile radius around it once belonged to the sultan of Oman. The land was given to the sultan in 1785 as a sort of dowry from the Khan of Khalat, the former traditional ruler of Baluchistan. This sleepy fishing village with such an enviable location was sold back to Pakistan in 1953 for about $10 million.

The sales agreement gave Oman recruiting rights here, and today Baluchi men in tribal clothes can be seen marching in front of Omani officers at an encampment near the airstrip. The officers, who visit once a year for a month, have enlisted 300 Baluchi volunteers during this year's session, according to Pakistani officials.

At the airstrip, distinguished from the barren plain only by the small one story building that serves as a terminal, a taxi stand consists of a row of Jeeps parked in the dust nearby.

In the village an estimated 30,000 people live in squalid one or two-story mud-brick houses. Goats, donkeys and dogs stray across the unpaved streets, and unwashed children play in the dirt outside their houses.

The village sits on a sandy seven-mile isthmus that ends in a high promontory of rock that stretches 10 miles from east to west. In the sheltered east bay formed by this T-shaped outcropping, a score of wooden fishing boats are beached on the sandy shore. The warm waters off this, the deeper of the twin bays, contain a rich harvest of fish including shrimp and lobster. There is also an abundance of sharks.

According to Pakistani officials, Soviet fishing trawlers ply the waters beyond Pakistan's 12-mile territorial limit, and at least one Soviet intelligence ship has been sighted farther away, near the Strait of Hormuz.

To develop Gwadar as a major port would require a lot of work. Currently neither of Gwadar's two bays has a jetty, and there are no other facilities for commercial or military vessels. Somewhat more advanced is Jiwani, 35 miles to the west near the Iranian border, where the British built a small naval and air base during World War ii.

Observers point out, however, that Karachi was also a sleepy fishing village until the British colonial administration of the late 19th century realized its harbor potential and began developing it. After World War ii, Karachi's population was around 200,000, but with the partition of India and Pakistan in 1948 the town came into its own as a port, and today its population exceeds 6 million.

Faced with the prospect of the Soviets taking up where the British left off, Pakistani officials are anxious to develop an area they have long neglected. But they would clearly prefer to see the West assume the burden.

Referring to the Soviet intervention in Afghanistan, an officer here remarked. "In the game of chess, you [the West] are one move behind. If you don't make Pakistan strong, you will lose the big game."