In all those centuries of gazing out over the sands, the sphinx had never seen anything like this. His monumental domain at the foot of the Great Pyramids had suddenly become Woodstock on the Nile.

Free spirits clapped and waved and danced across the ancient stones as sounds unknown in Egyptian history thundered out into the desert night. A guy with a propeller on his beanie stood on his chair gyrating to the music and others soon followed, hurling the seat cushions skyward with each crescendo. Clouds of pot smoke wafted up through the purple lights over the stage.

The Greatful Dead were playing Cairo.

There they were, the original acid rockers, in the outdoor theater at the pyramids where the night before Ruth Carter Stapleton, the president's evangelist sister, had joined the usual crowd of tourists for the pompous sound and light show that rhapsodizes over pharaonic glories.

As a part of that show, the sphinx talks. Booming out of loudspeakers, a voice is supposed to be the sphinx recalls the pharaohs and all the invaders up to Napoleon. But what would he say of this new invasion by the electronic crusaders from San Francisco and their army of cultists?

For the Grateful Dead, the series of concerts here is a logical extension of their interest in Egyptian culture and their exploration of Middle Eastern rhythms. But if Keith Godchaux, Mickey Hart, Bob Weir and company are moving into a new experience, their followers seem to have stood still, suspended in time. They still talk and look like the Woodstock generation.

Funny T-shirts. Sloppy jeans. Untrimmed beards and unkempt hair. Sleeping bags. Quaint and archaic argot of phrases like "far out" and "getting it together." And enough money to follow the Dead from concert to concert, even to Egypt.

These "Deadheads," as they call themselves, flowed into Cairo over the past week as the word went out that the band would be playing here. They and students from the local American school dominated the sold-out audience of about 2,000 persons, far outnumbering the somewhat dazed Egyptians.

The current "Number One Deadhead," Bill Walton, brooding center of professional basketball's Portland Trail Blazers, sat immobile on the stage, his foot in a cast, as the band blasted through "Not Fade Away" and "The Deal."

And the original Deadhead, Ken Kesey, seemed to have come nicely through his own Electric Kool-Aid Acid Test, prowling through the crowd talking of "getting the bus back together."

His busload of acid trippers has not rolled since Woodstock, and the lives and spirits of Kesey and the Grateful Dead have been intertwined for more than a decade, since before "Cuckoo's Nest," but Kesey says he is still "uplifted" by the "revolution."

The Deadheads, and planeloads of other enthusiasts who have stopped short of making camp-following a career, were here because their band was here. But what were the Grateful Dead doing here in a country where the rock audience consists of a handful of westernized students listening to pirated tapes. Surely this was more than just another stop in their traveling road show, which rolls on even if the forces that once propelled it have spent themselves.

Officially, this is a charity tour under the sponsorship of the Egyptian Ministry of Culture. The proceeds from ticket sales go to the Faith And Hope Society, the favorite charity of Mrs. Anwar Sadat, and to the Egyptian Department of Antiquities. However, what really happened is that the band wanted to come here, paid their own expenses - which they say may reach half a million dollars - and obtained the cooperation of the government by donating the proceeds.

"For us, it's always been an exciting idea," said lead guitarists Jerry Garcia. "We've seen fantasizing about it." He said the Grateful Dead "have had all the goodies that come with fame in the entertainment business in the United States. Now this is like giving ourselves a present, a vacation. We're doing something we wanted to do in a place where we wanted to do it."

Some members of the group have studied Egyptian history, and the Dead have been delving into the music of the Nile Valley through their association with Hamza El-Din, a Sudanese musician who has been living in Marin County, north of San Francisco, and working with percussionist Mickey Hart.

Hamza El-Din opened Thursday's concert with a long solo on his oud. As he played, he was joined by a dozen turbaned Nubians, clapping and thumping tambourines to a tricky rhythm that only the Egyptians in the audience seemed able to follow.

One by one, the members of the Grateful Dead come out onto the stage behind them, taking up places at their awesome array of instruments and amplifiers. First Hart, then drummer Bill Kreutzmann, then the others picked up the irregular beat, and the delicate traditional notes of oud and tambourine gave way to crashing rock.

The earth shook as the enormous speakers, powered by a specially imported generator, poured out the sounds of "Me and My Uncle" and "New Mingled with Blues." Without the walls of stadium or arena to contain the noise, it filled the night for at least half a mile in every direction, and Egyptian villagers began filtering in from the desert to hop over the fence and witness an event beyond their comprehension.

It was long after midnight and the desert chill had settled over the theater by the time the Dead roared into a number called "Truckin," usually heard in hot smoky arenas. Except for vocalist Donna Godchaux, who seemed to have little to do, they all appeared to be having a wonderful time, as did the fans cavorting below.

"You ought to come back on Saturday night," said a young woman from Texas. She said she was in Germany when she heard about the concerts, rode 48 hours in a train across Yugoslavia to Athens and caught a flight to Cairo just in time for the start. "They'll be into full-bore acid.There will really be some demons up there by the third night."

Musically, the Grateful Dead gratified their fans and overpowered the uninitiated, which was apparently what they'd intended. When an Egyptian reporter asked Garcia what kind of music the band played, he replied, "rock 'n' roll music, man. No, no - Grateful Dead music."