NASHUA, N.H. — Pete Buttigieg called on Democrats to get more serious about lowering the national debt, portraying himself as the biggest fiscal hawk in the presidential field and taking a shot at chief New Hampshire rival Bernie Sanders for being too spendthrift.

Asked at a town hall here how important the deficit is to him, Buttigieg said it's "important" and vowed to focus on limiting the debt even though it's "not fashionable in progressive circles."

"I think the time has come for my party to get a lot more comfortable owning this issue, because I see what's happening under this president — a $1 trillion deficit — and his allies in Congress do not care. So we have to do something about it," Buttigieg, the former mayor of South Bend, Indiana, said in a packed middle school gym, drawing cheers.

"We've figured out how to deliver health care to every American without a $20-, $30-, $40 trillion price tag. Or according to one of my competitors, an 'I don't know' price tag," he said.

It was a thinly veiled dig at Sanders, who told CBS News in January that it was "impossible to predict" the true cost of his "Medicare for All" plan because "nobody knows" what would happen to health care costs over a decade. Sanders, an independent senator from Vermont, has touted independent studies that indicate that his plan to collapse all private insurance into a government-run plan would reduce health care spending.

Let our news meet your inbox. The news and stories that matters, delivered weekday mornings. This site is protected by recaptcha

Buttigieg's remarks are out of step with plenty of progressives who believe Democrats are easily duped by conservatives into focusing on deficit reduction at the expense of their priorities when they control the presidency.

The deficit has risen sharply under President Donald Trump, as it did under his GOP predecessors George W. Bush and Ronald Reagan, all of whom enacted tax cuts and boosted defense spending. It fell under Democrats Barack Obama and Bill Clinton.

But cutting the deficit has not been a focus of the 2020 Democratic field, leaving an opening for Buttigieg to claim that mantle. He echoed fiscal hawks Sunday in arguing that higher deficits strain prospects for investment.

"It's not fashionable in progressive circles to talk too much about the debt, largely because of the irritation to the way it's been used as an excuse against investment. But if we're spending more and more on debt service now, it makes it harder to invest in infrastructure and health and safety net that we need right now," he said. "And also this expansion, which I think of as, by the way, just the 13th inning of the Obama economic expansion. It isn't going to go on forever."

Download the NBC News app for breaking news and politics

Buttigieg hasn't laid out a plan to significantly lower the national debt, which could require steep tax hikes or cuts in cherished programs like Social Security.

Asked to back up Buttigieg's claim to fiscal responsibility, a campaign aide pointed to a recent study by the Progressive Policy Institute that says the tax revenues Buttigieg has proposed to raise would narrowly exceed his new spending.

Stephanie Kelton, an economics professor at Stony Brook University in New York who is a senior economic adviser to Sanders, fired back at Buttigieg.

"It's 'not fashionable in progressive circles' because progressives are rejecting the bogus arguments about debt and deficits that have been used to undermine the progressive agenda for decades," she said on Twitter.

The Sanders campaign responded by suggesting Buttigieg was in the pocket of big donors.

“In a blatant effort to appease his billionaire donors, Pete Buttigieg is now parroting the same corporate talking points to justify cuts to Social Security and Medicare that have been used for decades — cuts that Bernie Sanders has fought to block,” Sanders communications director Mike Casca told NBC News. “This is part of a pattern: Buttigieg used to support Medicare for All, then he raked in huge donations from top pharmaceutical executives, and now suddenly he's against Medicare for All.”

But Steve Rattner, an investor who advised the Obama administration on auto industry policy in 2009, praised Buttigieg's comments: "Finally, a Democratic presidential candidate acknowledges that the deficit/debt is a huge problem that will need to be dealt with."