In a converted shipping container in downtown Rio de Janeiro, Claudio Prado de Mello gingerly lifted an ivory-handled toothbrush. The boar’s hair bristles were gone, but the 19th-century French inscription was perfectly legible: “His Majesty, Emperor of Brazil.”

This is an odd place for a treasure hunt. But here, below a busy highway overpass, behind a commuter train station, Brazilian archaeology is undergoing something of a renewal.

Prado’s team of investigators is combing the rubble from the building site of a new metro station, one of many public works the city is raising to groom for the 2016 Summer Olympics.

So far they have turned up some gems: Parisian porcelain and still-sealed perfume bottles from Brazil’s imperial era, and stone spearheads and hammers that Paleoindians — perhaps the first Cariocas, or Rio natives? — used 3,000 to 4,000 years ago.

It’s not unusual to unearth antiquities in the maw of modernity. This year, excavators found the bones of a child buried in a pagan, medieval ritual in downtown Plovdiv, Bulgaria, while a dig in the Roman Forum last year turned up a limestone wall from around 900 B.C.

But the find in Rio, a city of 6 million, on a terrain scraped, scavenged and rearranged by emperors and engineers for two centuries, was surprising. Perhaps even more surprising was that it was found at all.

A few years ago, Brazilian archaeology was an ailing profession. Researchers complained of working on shoestring budgets, and reports of imperiled national patrimony and signature museums shuttered by strikes and underfunding were common.

That’s no longer the rule. Prado leads an eight-member team, which once numbered 50 at the height of excavations in 2013. Along with an increasing number of researchers, he owes his job not to top universities, where research is still a labor of love, but to engineers and grand public works, the new patrons of Brazilian environmentalism and science.

Archaeology, in particular, is enjoying a revival, thanks in part to an unlikely convergence of bureaucracy and sensibility. To win bids to build roads, dams and subway tunnels, contractors must file voluminous impact studies to show regulators they will not spoil the environment or plow under historical monuments.

Suddenly, it’s a seller’s market for Prado and his colleagues, whose job it is to study and salvage relics before the earthmovers take over.

Brazil doesn’t keep a tally of so-called contract archaeologists, but Prado welcomes the company. “I used to pay out of pocket to dig, now I get a salary and staff,” said the 50-year-old scholar who once planned to build a career in Egypt. “Purely scientific archaeology is disappearing.”

Not everyone is happy about this arrangement. Builders often grumble about the red tape and the expense of keeping scientists on payroll, while scholars fret over turning into shills for hardhats, with the blessing of a government “in service to powerful economic interests,” as one critic warned.

Still, it’s hard to argue with a brand-new reliquary. “You don’t often find a site with millennial artifacts, and now we have the opportunity to study one,” Prado said. His words were almost lost in the growl of Rio’s rush hour.

Mac Margolis is a Bloomberg View contributor based in Rio de Janeiro who has traveled extensively in Brazil and Latin America. He has reported on Latin America for Newsweek and contributed to The Economist, The Washington Post, the Christian Science Monitor and Foreign Policy. He is the author of “The Last New World: The Conquest of the Amazon Frontier.”