The temple, inside a larger ruin, includes a staircase that leads up to an altar used for fire worship at a site scientists have called Ventarron, said Peruvian archaeologist Walter Alva, who led the dig.
It sits in the Lambayeque valley, near the ancient Sipan complex that Alva unearthed in the 1980s. Ventarron was built long before Sipan, about 2,000 years before Christ, he said.
"It's a temple that is about 4,000 years old," Alva, director of the Museum Tumbas Reales (Royal Tombs) of Sipan, told Reuters by telephone after announcing the results of carbon dating at a ceremony north of Lima sponsored by Peru's government.
Lambayeque is 472 miles from Lima, Peru's capital.
Discoveries at Sipan, an administrative and religious center of the Moche culture, have included a gold-filled tomb built 1,700 years ago for a pre-Incan king.Peru is rich in archaeological treasures, including the Inca citadel of Machu Picchu in the Andes.