The federal government spent more than $4 billion to resolve lawsuits last year, a $1.3 billion increase from spending in 2011, an analysis of government records shows.

The 7,000 payments, which are detailed in an obscure database overseen by the Treasury Department known as the Judgment Fund, tell a story of the federal government’s inner workings. They highlight often devastating mistakes made by government workers — such as the air-traffic controller who was allegedly making a personal phone call when a small plane and a helicopter collided — and reveal how much the government paid in recompense — in that case, $18.7 million to a woman whose husband and son were among the dead.