When seven Marines were killed late last month in what turned out to be a missile fired mistakenly at their vehicle by a U.S. Air Force pilot, field commanders quickly called upon a vast logistics network to come up with something that would avert more deaths by "friendly fire."

From Army laboratories and depots around the United States came a number of suggestions, such as stripping hundreds of thousands of feet of special reflective tape across military vehicles or giving soldiers chemical lights to use as infrared beacons. But that wasn't enough for the Army.

It wanted paint -- a special kind of paint for tanks, trucks and other vehicles that would emit distinctive infrared rays detectable by sensors inside the cockpit of allied fighters.

During the weekend of Feb. 2, Army officials found a family-owned Milwaukee paint firm whose chemists said they could develop the necessary formula. By the following Monday, after testing by the Army, Hentzen Coatings was churning out thousands of gallons of the stuff. By last week, 30 pallets -- or more than 60 tons -- of paint and other marking materiel had been shipped to the Persian Gulf War zone.

U.S. officials won't disclose details of the formula or how it remains undetectable to Iraqi pilots, but the incident shows how the military has been able to respond quickly to logistical problems in Operation Desert Storm.

By all accounts, the massive logistics support for Desert Storm has been extraordinarily successful. Gen. H. Norman Schwarzkopf, commander of U.S. forces in the gulf, said Wednesday the "logistical situation is absolutely superb. There are no logistical problems out there that will be show-stoppers."

Not everything, though, has gone smoothly.

Many of the flak jackets and chemical suits worn by soldiers in the desert are still forest-green, since not all the requisitioned desert-tan camouflage clothing has arrived. Similarly, many soldiers continue to smear mud over the sides of their green military vehicles while they await supplies of desert-tan paint.

Soldiers still forage through other units' supplies -- the "midnight requisitions" that occur in every war. And there have been concerns that it took longer than desired for some Army divisions to move to Saudi Arabia -- delays particularly in the transport of equipment from U.S. bases in Europe.

Military officials like to say that in deploying about 523,000 troops to the gulf, they moved enough people, cars and household belongings to fill the equivalent of Richmond and Des Moines.

Several factors facilitated this enormous move. One was time. U.S. forces had "161 days to land all that stuff with nobody firing a shot," Vice Adm. Paul D. Butcher, deputy commander of U.S. Transportation Command at Scott Air Force Base in Illinois, said recently.

Additionally, a modern infrastructure of bases, ports and military installations already existed in Saudi Arabia. The Saudis also have provided fuel and ground transportation.

To maintain the Desert Storm forces, operations centers in the United States process requisitions from the gulf around the clock. The Army alone has generated 1 million requisitions covering 931,000 tons of materiel from the war zone since August. Each is routed by computer into a complex web of depots, arsenals and other supply centers.

"Now we have to sustain it with everything -- from the food that they eat, to the clothes that they wear, to the trucks that they drive, to the weapons that they shoot. And . . . if we fail, we lose," said Lt. Gen. Marvin D. Brailsford, a top readiness official at Army Materiel Command.

Overseeing this giant flow of supplies is Army Maj. Gen. William G. "Gus" Pagonis, chief of logistics in the war zone. "Pagonis started out with a handful of sand and has built a logistical structure over there that's really kind of amazing," said Maj. Gen. Charles M. Murray of the Army Materiel Command.

The system also depends on individuals who have been less visible to the general public. One of them is retired Army Sgt. Maj. John Hall, 42, who works at Fort Belvoir's "Skunkworks" quick-reaction lab and has been detailed to Schwarzkopf's U.S. Central Command. He has traveled to the gulf six times since Iraq's invasion of Kuwait Aug. 2. He eats and sleeps with U.S. soldiers at the front, listens to them, then tries to fill their requests.

Hall works closely with Richard Franseen, director of AMC-FAST, a small Army Materiel Command unit nestled a few hundred feet from the Potomac River at Fort Belvoir. Franseen's job is essentially to cut through red tape. He has the run of seven Army technology labs and 10 specialized weapons and troop support commands nationwide.

If the Army doesn't have the item Franseen is looking for, he tries to have it designed quickly. Typically, he sends Hall back to the gulf laden with overstuffed duffel bags of tools, weapons parts and computer software -- some of it experimental, some of it very secret, much of it mundane.

Among the mundane: One recent shipment carried by Hall included special adaptors to link the drinking straws in chemical masks to five-gallon water jugs.

The greatest challenges for the logisticians have come from the vastness and openness of the desert. Roads have had to be built, better tires bought. To prevent equipment from overheating in the blazing summer and early fall, solar shields were needed.

Epoxy tape was rushed to the gulf for the edges of helicopter blades, which were being eroded by sand whipped by the rotors. Filters were developed for ducts in tanks and other vehicles; some soldiers had been improvising with nylon hose. Large sand dunes posed a hazard to helicopters flying low at night, and a navigational device was adapted to deal with this problem.

Ironically, sandbags also posed a problem. The Saudi sand, fine as dust, began leaking out of bags, according to a Defense Logistics Agency official. He said the agency recently received an urgent request for sandbags made of more tightly woven cloth -- 75 million of them.

Said military analyst David Isby, paraphrasing a German general who served in Rommel's African desert campaign, "They always used to say the desert was the tactician's paradise -- and the logistician's hell."

After President Bush committed troops to the Middle East in August, initially to protect Saudi Arabia against possible attack by Iraq, there were brainstorming sessions at every level of the military to anticipate the requirements and unique problems the operation would pose. The Army's logistics agency, Army Materiel Command, and some of its subgroups -- Missile Command at Red Stone Arsenal in Huntsville, Ala., Tank-Automotive Command in Detroit and Aviation Systems Command in St. Louis -- had already produced much of the equipment that would go to the gulf.

Early last fall, the Army Materiel Command created a Surge Committee of top generals that set about determining what was in stock and what would require accelerated production. Executives from 16 major aviation firms were called in for meetings, and senior generals made personal visits to ordnance factories to give pep talks to workers.

The Army also tapped the expertise of two obscure agencies: one, at Lexington, Ky., maintains a huge computer base of maintenance and repair histories for weaponry and supplies. Army officers focused on the accumulated data from years of desert training at the National Training Center at Fort Irwin, Calif., and recent military exercises with Egypt.

A second agency at the Aberdeen Proving Ground in Maryland analyzed the data. To sustain the initial phases of the gulf buildup, the acquisition rate for weapons and supplies was cranked up by 50 percent to account for additional training and by another 100 percent as a result of the desert environment. When combat began last month, the factor was increased to five times the normal rate, officials said.

The Surge Committee, which has continued to meet every Wednesday, ordered increased production of certain ammunition stocks and helicopter engines, as well as such items as gas masks, small maintenance shelters, water chillers and storage tanks. At more senior levels of the Army, the decision was also made to speed up production of the Patriot missile, used to intercept Iraqi Scud missiles that have been fired at Israel and Saudi Arabia.

As the operation wore on, new questions arose, often coming from troop experiences in the gulf. For example: Could soldiers sleep inside tanks? Many of the answers came from people like Hall and Franseen and their network of science advisers stationed at military bases around the world.

In fact, the Army Human Engineering Lab at Aberdeen had been looking at hammock-like contraptions for sleeping in tanks, Franseen said, but there has since been more debate about it.

"There is not a universal agreement that the soldiers in a tank should sleep," said Franseen, noting that some Army officials worry it would cause image problems. "But the point is that if you keep them in there for 72 hours straight it's just not reasonable to assume that they don't need any sleep," he said.

But last summer, when the desert was still hot, Hall reported back from the front with accounts of hardships suffered by four-member tank crews. "I lived in the field with them; at first we slept on the tops of tanks. It was so hot you couldn't sleep anywhere else. You couldn't touch the tank during the day. You had to use gloves, had to learn how to get into whatever shade was available," Hall recalled.

Hall said soldiers were drained by sheer heat and exhaustion, and worked less effectively as a result. It was decided that "if we could keep 50 percent of the crews rested and the others on vigil, somebody would be getting some sleep, and folks would be a bit more cognizant of what was going on," Hall said. By last month, 800 hammocks had been rushed over, Franseen said.

When Gen. Crosbie Saint asked in a talk to a military group in Germany last fall why there was no easy way to drain five-gallon fuel cans to fuel tent heaters, Franseen located a cradle-like contraption at an Army lab in Natick, Mass., that siphons out fuel. The Pentagon ordered 3,000 of them for $75 apiece, said Saint's science adviser, Todd Stevenson, from Heidelberg.

Soldiers at Fort Hood, Tex., have been a fount of good ideas, which have resulted in the production of six or seven items since August. A couple of sergeants had the idea for the water jug adapters for the chemical masks. Two others worked up a tank-engine analyzer that could fit in a briefcase; 14 prototypes are in production at the Army Harry Diamond Labs at Adelphi, said Fort Hood science adviser Pat Easton.

Another Fort Hood soldier devised a way to cover and better protect a quick-release switch used for jettisoning stores from the Apache helicopter. The Apache fleet will soon be equipped with the device, Easton said.

Urgent requests from the field continue. Six weeks ago, the Army received a call for 3,000 tires for heavy-duty transport vehicles that carry tanks. Distances have been greater than anticipated, and tires have worn out quicker than expected.

But nothing matched the urgency of the "friendly fire" problem. On Feb. 1, when military briefers were telling reporters of the seven deaths, Pentagon officials were trying to ascertain what further preventive measures might be taken.

That afternoon, Maj. Gen. Thomas B. Arwood, a readiness official with Army Materiel Command, didn't even wait to return to his Alexandria office after being briefed on the problem at the Pentagon. Picking up the phone, he dialed his colleague, Maj. Gen. Murray.

Recalls Murray, "He called from over there and said, 'This is a hot one.' "

Staff writers George C. Wilson and Guy Gugliotta and researcher Lucy Shackelford contributed to this report.