Alan Krueger, a Princeton University economist who served as a top adviser to Presidents Bill Clinton and Barack Obama, died Saturday, according to the university.

The 58-year-old committed suicide, his family said in a separate statement released by the school Monday.

“It is with tremendous sadness we share that Professor Alan B. Krueger, beloved husband, father, son, brother, and Princeton professor of economics took his own life over the weekend,” the family said. “The family requests the time and space to grieve and remember him.”

Krueger served as a Labor Department economist under Clinton, then as a top Treasury official for Obama. From 2011 to 2013, he was chairman of the Council of Economic Advisers.

“Alan was someone who was deeper than numbers on a screen and charts on a page,” Obama said in a statement. “He saw economic policy not as a matter of abstract theories, but as a way to make people’s lives better.”

He added, “Through it all, he had a perpetual smile and a gentle spirit — even when he was correcting you.”

An authority on the labor market, Krueger devoted his research to the impact of minimum wage — concluding that a higher minimum wage didn’t generally slow hiring as critics have argued.

In a statement, Obama credited Krueger with helping boost the US economy following the 2008 financial crisis.

“He spent the first two years of my administration helping to engineer our response to the worst financial crisis in 80 years and to successfully prevent the chaos from spiraling into a second Great Depression,” Obama said. “He helped us return the economy to growth and sustained job creation, to bring down the deficit in a responsible way and to set the stage for wages to rise again.”

Krueger had taught at Princeton since 1987. His other research included economic inequality and the impact of opioid addiction on the job market.

He also dabbled in unconventional research when it came to economics. In a 2005 paper, the Bruce Springsteen fan found a rising wealth gap within pop music, specifically that a bulk of concert revenue was flowing to top performing artists. His book “Rockonomics” about economics and the music industry is set to be published in June.

Krueger also coined the concept of the “Great Gatsby Curve” — named after F. Scott Fitzgerald’s iconic character, Jay Gatsby, who goes from being a poor Midwesterner to a wealthy bootlegger.

The notion links high economic inequality and low economic mobility from generation to generation — meaning children from poor families are less likely to improve their economic situation as adults in countries where income inequality is higher.

Princeton called Krueger “a true leader in his field, known and admired for both his research and teaching.”

“In addition to his scholarship, Alan’s life exemplified a commitment to public service,” the university said.

Krueger is survived by his wife, Lisa, and two adult children, Benjamin and Sydney.

With Post wires