WASHINGTON—The U.S. spent nearly $1 trillion more in fiscal 2019 than it took in—the highest deficit in seven years that would have been bigger without a rebound in corporate tax revenue.

Government deficits have now increased for four years in a row, the longest stretch of U.S. deficit growth since the early 1980s, a period marked by two recessions and a jobless rate near 11%. The budget gap widened 26% in the fiscal year that ended Sept. 30, to $984 billion from $779 billion deficit the previous year, the Treasury said,...