SANAA, NORTH YEMEN -- Oil exploration can be risky business. Ask the Dallas-based Hunt Oil Co.

On a clear night in 1986, one of Hunt's towering oil rigs drilling in a remote area of this country stood like a Christmas tree glowing on the horizon.

Unfortunately, it so dominated the skyline that a nearby North Yemen Army antiaircraft battery sighted its Soviet-made SA6 missiles on it.

Without warning, the battery crew fired two of the missiles. Before the oil rig workers knew what had happened, the missile warheads exploded short of the target, showering the rig with metal fragments.

Officially, the incident never happened, but western sources confirm the firing. All that Hunt's in-country operations manager, Mark Nicholas, would say about it recently was that he has kept a souvenir piece of shrapnel from one of the missiles.

Western sources say that North Yemen's antiaircraft defenses have been at a high state of alert since Israel bombed Palestine Liberation Organization camps in Tunisia in October 1985. The PLO maintains a military base for several hundred fighters outside this North Yemen capital, and at least once since the 1985 Tunisia raid, Israeli warplanes have been detected on radar flying far south over the Red Sea toward North Yemen.

Following a PLO hang-glider attack on an Israeli military camp near the Lebanese border in November, some PLO officials are known to be concerned that Israeli military commanders might be looking at the PLO presence here as a possible target for retaliation.

"If they {the Israelis} hit Lebanon, no one will pay attention to it because they always hit Lebanon," one source said. "But if they want to do something dramatic, they might be looking at the PLO base here."

The missile firing on Hunt's oil rig, although it occurred without injury, demonstrates the potential dangers that the American oil company could encounter in a country with a history of instability, civil war and assassination.

Geologists told company chairman Ray L. Hunt there was evidence that a subterranean desert basin, thought for years to be a shallow bed of mud sediments, was as deep as other oil-bearing zones on the Arabian Peninsula. Hunt then said he had to make a "risk analysis" of the political stability of North Yemen before making a financial commitment.

There were risks, Hunt said in an interview.

The man on the street in many parts of North Yemen carries a knife, the traditional jambia dagger, and an AK47 assault rifle. The country for centuries has been ruled by tribes that resist central government control. To this day, the emergency rooms of hospitals see a daily stream of knife and gunshot wound patients, victims of tribal disputes.

Tribal sheiks often control arsenals of weapons. One northern sheik keeps a World War II-vintage Soviet tank in the courtyard of his fortress-like house to impress visitors.

Much of Hunt's final decision to sink hundreds of millions of dollars into North Yemen was based on a "gut instinct" that President Ali Abdullah Saleh, 42, had proven a shrewd broker of tribal politics and had given the country nine years of relative stability since taking power in 1978 as a young Army officer.

"He does not have a lot of formal education, but he has fine political instincts for handling the tribes," said Hunt.

The development of North Yemen's first oil field required a massive industrial effort and the laying of a 230-mile pipeline over imposing granite mountains that separate the country's eastern desert from the coastal plain along the Red Sea.

"The first time the pipeline engineers saw this terrain," Hunt said, "they told me they weren't sure they could do it."

Hunt's managers also had to weigh the perils of laying a pipeline through dozens of tribal fiefdoms.

"One of the first things the government said to us was, 'We'll take care of the tribes,' " said Hunt. Saleh used his military forces to close roads and escort convoys carrying thousands of tons of oil refining and production equipment across hundreds of miles of difficult landscape.

Still, incidents were unavoidable. Two Hunt oil field supervisors driving down a desert road passed a young boy hitchhiking. When the oilmen failed to stop for the youngster, he unslung his assault rifle and blasted a road sign ahead of the truck.

"As you can imagine, they stopped and backed up and gave the boy a ride," said a Hunt official.

On another occasion, a herd of camels strayed too close to a drilling rig and one of the workers, attempting to fend them off with a large wrench, struck a camel and knocked its tooth out.

"The next morning one of the tribesmen showed up demanding a tooth from one of our men," a company official said. The drilling crew, eager to satisfy tribal justice, paid the tribe money in lieu of settling tooth for tooth.

In a country where petty bribery and corruption are a fact of life in doing business, Hunt said he made it clear to government officials that the company would not pay commissions or employ local agents in order to operate smoothly. "We said we're just a bunch of good old boys from Texas who hopefully know how to find oil . . . Everything was going to be right on the top of the table," he said.

But a Hunt employe recently complained to one official here that in order to get a piece of equipment through airport customs, he had to get 26 signatures on customs forms and pay 26 bribes.

In the field, Hunt officials practiced a kind of desert diplomacy that won them friends among the tribesmen.

The company's first drilling superintendent, a 6-foot-4 Texan named "Big" Denmon, piped running water and strung wires for electricity to the Army camp that guarded the desert drilling site. ("Big" Denmon's brother, "Little" Denmon, who is the same height but was born 10 minutes after his brother, also works for Hunt.)

When flash floods washed out a farmer's fields on the pipeline route, Hunt bulldozers diverted and repaired the farmer's irrigation levees. And after one of Hunt's four-wheel-drive land cruisers disappeared from a drilling camp, it was returned the next morning with a sheep inside as a token of the erring tribesman's apology.

Oil industry officials say Hunt had phenomenal luck in striking oil with the first well, drilled in mid-1984. The nearest producing oil well is 600 miles away in Saudi Arabia. But all of the early signs were positive.

"Once when one of the rigs was changing camps, some men were drilling a water well and it blew out with natural gas," said Hunt, noting that two men were killed in the freak incident. "That was very unfortunate for the two men, but it was a very promising sign."

The pipeline and oil production facilities were completed in less than a year. "Eleven months ago, there was nothing but sand here," Hunt said during dedication ceremonies near the ancient eastern city of Mareb. A day later, appearing with President Saleh at the Red Sea terminal of the pipeline, Hunt said that in those 11 months, pipeline construction crews had moved almost as much earth as was moved during the 11-year construction of the Suez Canal.

North Yemen hopes to earn $600 million in 1988 under its production-sharing agreement with Hunt. And Hunt, who has taken on Exxon Corp. and a Korean firm as partners in North Yemen, will continue searching for oil.

Praising Saleh and the "unprecedented" level of cooperation his company received during the project, Hunt later told reporters, "I would not want to be on record as saying this was a risk-free operation."