The Papacy (Holy See)
Vatican City
~1,900+
years
Longest continuously operating sovereign institution in recorded history.
The U.S. Government
Because democracy only works when we understand it
It's a surprisingly tricky question. Governments change their constitutions, get conquered, shift from monarchies to republics, gain or lose territory, and evolve over time. So historians look at a few different measures: the institution (has it ever been abolished?), the constitution (has the founding document ever been replaced?), and sovereignty (has the country ever lost independence?).
The governments below are the strongest contenders under each of those measures, along with honest explanations of what each claim means and where the caveats lie.
* Bar lengths are approximate, exact founding dates are debated by historians.
Vatican City
~1,900+
years
Longest continuously operating sovereign institution in recorded history.
Republic of San Marino
~1,700+
years
The world's oldest republic with a written constitution, and the only country never conquered in its entire recorded history.
Japan
~1,400–2,600+
years
The world's oldest continuously ruling royal dynasty by any credible historical measure.
Kingdom of Denmark
~1,060+
years
One of the oldest continuously ruled kingdoms in European history.
United Kingdom
~730–810+
years
The Mother of Parliaments, the legislative model that influenced democratic governments worldwide.
Switzerland
~730+
years
The oldest continuously functioning federal state and one of the world's oldest democracies.
United States of America
~237
years
Home of the world's oldest written national constitution still in active use, 237 years and counting.

The United States is not the longest-running government, but it does hold one of history's most remarkable records: the world's oldest written national constitution still in active, uninterrupted use.
At 237 years old, the U.S. Constitution has outlasted empires, revolutions, and the fall of dozens of governments that once seemed permanent. Most constitutions around the world are replaced every 17 to 30 years on average. The American one has endured , amended, but never replaced.
San Marino may be older. Japan's imperial dynasty may be longer. But no democracy has kept the same foundational document running, without interruption, for as long as the United States has.
Oldest republic
San Marino
Founded 301 AD
Oldest monarchy
Japan
~1,400+ years documented
Oldest institution
The Papacy
~1,900+ years
Oldest federal democracy
Switzerland
Federal state since 1848
Oldest written constitution
United States
In use since 1789
Most amendments
India
100+ amendments since 1950