RENAISSANCE OF ISLAM: ART OF THE MAMLUKS -- At the Museum of Natural History through July 19; at the Freer Gallery of Art indefinitely.

Life among the Mamluks was a perilous proposition, unless you were an artist. For 250 years, as they beheaded one another or poisoned their enemies' mares' milk, they also presided over an explosion of beauty unmatched in the world of Islam.

With "Renaissance of Islam: Art of the Mamluks," starting Friday at the Museum of Natural History with a companion show at the Freer, the Smithsonian celebrates the Mamluks' reign from Cairo over the medieval Middle East.

It's the first time since the 13th through 16th centuries that so many fine examples of Mamluk art have been assembled in one city.

The dual shows reveal, through more than 150 pieces ranging from metalwork to tapestry, a culture less remarkable for intrigue -- which, after all, is part of any people's past -- than for its passion for things exquisite, and the stature the Mamluks achieved thereby as patrons nonpareil.

A brass basin inlaid with silver and gold, said to have been commissioned by a nobleman for the prosaic business of food storage, is typical of the luxury the Mamluks demanded. Nearly seven centuries old, it's a universe unto itself: warriors, courtiers, wild boars and sphinxes springing from every surface: a mix of detail and sweep you last saw in "Gone with the Wind."

The basin, perhaps the prize of the exhibition, was lent to Natural History by the Louvre, one of 19 museums from Damascus to Detroit that took part, owing to the diplomacy of the curator, Dr. Esin Atil. Three years in the making, the show at Natural History will criss-cross the United States through 1983 as an offering of Smithsonian Institution Traveling Exhibition Service.

Ironically, because "Art of the Mamluks" was conceived as a traveling exhibition, Atil excluded serveral of the most beautiful pieces because they weren't sturdy enough. The Freer's curator of Islamic art, she declined, in one instance, Egyptian offers of magnificent but delicate wood-carvings from the estate of a Mamluk sultan. But, what with the stuff she accepted -- illuminated Korans, ceramics and such -- only gluttons will complain.

Among other things, the result is a tribute to upward mobility. The word "Mamluk," in Arabic, comes from the verb "to own," and these people from Central and Western Asia were brought and sold like cattle by the sultans of the Ayyubid Empire.

It would be a mistake, though, to think of the Mamluks as slaves. Instead, as Atil writes in the handsome catalogue, they were "an elite corps of bodyguards" trained in the arts of war, and thus admirably equipped to replace the Ayyubids when the time came.

The moment arrived in 1250, with the assassination of Turan Shah, the last Ayyubid sultan, and the election of his stepmother, Shajar al-Durr, to the throne. A freed Mamluk named Aybak, installed by his peers as commander-in-chief, improved the opportunity by marrying Shajar al-Durr and becoming sultan himself.

Seven years later, in a typical turn of events, the queen murdered Aybak in his bath, and, as Atril recounts, "met an equally treacherous end . . . at the hand's of Aybak's vengeful concubines, who beat the queen to death with their clogs and threw her body from the walls of the palace." So it went.

Yet the Mamluks spawned a society of enormous sophistication, establishing a regular postal service between Egypt and Syria, building marvels of architecture and engineering, promoting science and literature, and endowing mosques and seminaries to the greater glory of Islam, their adopted faith.

Rich though they were, Mamluk sultans habitually spent so much money in a game of aethetic one-upmanship that they sometimes were bankrupt. In the early 15th century, as Atil writes, the Mamluk economy was a shambles, suffering from the familiar litany of "inadequate collection of taxes, loss of trade revenue, increasing military expenditures, devaluation of the currency and inflation." But, in a manner not feasible today, the sultans could fix things by resorting to extortion and murder.

These were stopgap measures, alas. In 1517, the Mamluks fell to the hordes of the Ottoman Empire, leaving as a legacy only beauty.