A chance discovery of a medieval clay oven has revealed that Moorish architects used powdered animal bones to protect the walls of fortresses close to the Alhambra Palace in southern Spain.

The finding represents the first evidence of powdered bones being used in protective coats, or patinas, in Moorish architecture, said Granada University geologist Carolina Cardell, who headed a yearlong scientific research project at the site.

"We know this method was used in Greek, Roman and Celtic structures, but this is the first report of it in a Moorish building," Cardell told The Associated Press.

Cardell's team's findings were published Wednesday in the U.S. journal Analytical Chemistry.

• Click here to visit FOXNews.com's Archaeology Center.

The discovery began when archaeologists restoring a 13-foot (4-meter) rampart a short distance from the Alhambra stumbled across the remains of a clay oven beside a pile of bones and ashes.

The wall was built sometime between 1333 and 1354 by Moorish ruler Yusuf I, who also constructed a key section of the Alhambra Palace complex.

The palace is the architectural jewel near the city of Granada from which Moorish caliphs ruled most of Spain until King Ferdinand and Queen Isabella expelled them in 1492, ending 800 years of Muslim rule. The palace is now a UNESCO World Heritage Site and a major tourist attraction.

Suspecting the find had something to do with the wall's coating, the archaeologists asked Cardell and her colleagues at the city university's mineral and petrology department to investigate.

The team first found that the oven — estimated to have measured some 22 square feet (2 square meters) — had operated at temperatures of around 1,800 degrees Fahrenheit (1,000 Celsius).

"This was far higher than the temperature normally used in firing ovens, so it was obvious they used it for something else," Cardell said.

Traces on the oven's brickwork revealed hydroxyapatite, a mineral that is the main component of bone. Bones must be heated at high temperature in before they can be powdered.

The scientists then used a series of ultra-sensitive detection methods and found the same substance on the wall.

"The bone powder would have strengthened the wall's coating better than any other substance," Cardell said.

Cardell said there is evidence that the bone powder, mostly from pigs, may have been used in other Moorish structures in the area but so far there is nothing to indicate it was used in the Alhambra itself.