Within the grounds of the Malacanang presidential palace, the rival worlds of the Philippines today rubbed shoulders, and at times, some raw nerves as the palace was opened to the public for the first time since deposed president Ferdinand Marcos took up residence in 1965.

Outside in the steamy heat, hundreds of poor Filipinos pushed against the inner palace gate, determined to be the first to visit the once forbidden seat of power. Several women suffered from heat prostration.

Inside, women volunteer guides, many of them from the educated upper classes, went through a final pratice run with foreign journalists, showing them around the premises that President Corazon Aquino has turned into a museum rather than a residence.

Jaciento Pena, 50, an unemployed worker from the southern island of Mindanao, had come to the capital to seek work. The important thing, as he patiently awaited his turn to enter the palace, was "simply being allowed here."

What struck unemployed worker Ajon Nieves, 27, among the first to complete the visit, was "seeing all those expensive things," especially Imelda Marcos' hundreds of dresses, 3,000 pairs of shoes and 500 black brassieres in the basement.

"It was like a supermarket, and an expensive one at that," Nieves said, referring to gold-plated fixtures in Mrs. Marcos' bathroom, a jacuzzi replete with a box of rosary beads and giant bottles of French perfume.

The opening to the public comes after more than a week of intensive cleaning of the palace, which began with a fumigation. Then, according to Beatrice Zobel, who headed the cleanup crew, an accounting firm was called in to conduct an inventory, documents were turned over to the commission investigating the "ill-gotten wealth" of the Marcos family and their associates, and the Central Bank picked up all the jewelry, gold coins and other valuables found in palace vaults.

President Aquino has said she will not live in the palace but will work in a bedroom in the former guest house across the driveway from the palace.

For the guides, the Marcos palace typified what they described as the bad taste and greed that had left the country near bankruptcy.

Guide Maria Theresa Roxas, whose husband served as a government minister a generation ago, decried the $10 million she said was spent by the Marcoses in refurbishing the palace, changing what was once a graceful late 18th century Spanish edifice into a windowless, air-conditioned "bunker."

"It was a shame," she said, that the Marcoses had "destroyed this last period piece where both Spanish and American governors general lived since the late 19th century."

Airy verandas used to overlook the Pasig River flowing just outside the palace, she said. But the Marcoses replaced them with a windowless reception room.

"They complained the Pasig smelled," Roxas said. "But it would have helped a lot more people if they'd spent the money cleaning the river up."

Aquino has ordered that printed signs through the palace inform and admonish visitors to respect Malacanang as "the palace of the people."

Plastic covers the red carpet leading up the marble stairs and the walkways that are laid out along the polished wooden floors in the upper stories.

At the far end of the palace grounds, journalists viewing Marcos' private videocassette collection aroused the hostility of some lower ranking personnel who are apparently still loyal to Marcos.

As television teams searched through 500 one-hour videocassettes for glimpses of parties that the Marcos family taped, the video library personnel tried to stop the operation. Finally, the new Information Ministry officials stopped the viewing by the journalists.

For the most part, the tapes showed endless birthday parties, official visits abroad, exhortatory speeches and religious celebrations filmed with the verve of a home movie buff at amateur hour. Occasionally, there was a spectacle of an ailing Marcos determined to convince his nation that he was in good health.

Dressed in a jogging suit and holding a golf club, Marcos could be seen going through the motions of swinging toward a fake hole on the palace lawn. As still and video cameras record the scene, he mumbles about making it look "more authentic."

In another videotape, Imelda Marcos, greeting newly commissioned generals last year, says: "For the Americans we are indispensable. I told Mr. Reagan that if you have the Philippines with you, the sun will never set on the U.S.A. in Asia because when it's 12 o'clock high noon in New York, it's midnight here."

Smiling to herself, she concluded, "We can always use this as leverage."

More chilling was the cassette of a televised news conference from the early 1970s in which President Aquino's late husband, Benigno Aquino, charged that the Marcos regime had framed murder charges against him.

Denouncing such suggestions as "vicious lies, a canard and the worst black propaganda," Benigno Aquino directly accused Juan Ponce Enrile of trumping up the charges.

At that time, Enrile was Marcos' defense minister. Now, after coleading an Army revolt that resulted in Marcos' ouster, Enrile retains the position of defense minister under President Aquino.

A white-haired Lourdes Carlos came closest to summing up the day's mood. Emerging from the palace tour, the 70-year-old palsy victim leaned on her cane and thought for a minute.

"I'm very happy Mrs. Aquino let me come. No one had let the poor in before. That's what used to anger me. Now it's already the past."