Treasury Secretary Janet Yellen admitted Tuesday that interest rates may need to rise to contain burgeoning growth in the US economy, driven in part by trillions of dollars in government stimulus spending.

“Interest rates may have to go up a bit to make sure our economy doesn’t overheat,” Yellen said during a business seminar presented by The Atlantic. “Although the extra spending is relatively small in relation to the size of the economy, it could result in very modest rate hikes.”

“But these are investments that our economy needs to be competitive and productive. I think it will make our economy grow faster,” she added.

The US economy was already on fire with GDP growth of 6.4% in the first quarter. Goldman Sachs recently announced that the second quarter will grow by around 10.5%.

Since the outbreak of the Covid-19 pandemic in March 2020, Congress has allocated around $ 5.3 trillion in stimulus spending, resulting in a budget deficit of more than $ 3 trillion in fiscal 2020 and a deficit of 1.7 trillion US dollars in the first half of fiscal 2021.

Biden’s government is pushing for an infrastructure plan that could spend an additional $ 4 trillion on various longer-term projects.

Although she said the US needs to focus on financial responsibility in the longer term, she said spending on matters central to the government’s mission has been ignored for too long.

President Joe Biden “is taking a very ambitious approach that makes up for more than a decade of under-investment in infrastructure, research and development, people, communities and small businesses, and it’s an active approach,” said Yellen. “But we’ve worked far too long to solidify long-term problems in our economy.”

The Federal Reserve, which Yellen ran from 2014-18, has anchored short-term interest rates near zero for more than a year, despite the fact that the economy has grown at its fastest pace in nearly 40 years. Central bank officials have vowed to maintain the accommodation policy until the economy makes “significant further progress” towards full employment and inflation, which averaged 2% over the longer term.

Inflation concerns have arisen amid all the spending and rapid growth, but Fed officials have said that after a brief spike this year, price pressures are likely to ease.

Yellen has said that for the most part she is not worried about inflation becoming an issue, although she has added that there are tools to remedy this should it happen. Fed chairman Jerome Powell recently said the main tool for controlling inflation is higher interest rates.

White House press secretary Jen Psaki said Biden “certainly agrees with his Treasury Secretary” on the potential need for higher interest rates, according to various media reports.

Speaking of concerns about the US’s huge deficits, Yellen said, “We have to pay for some of the things we do,” even though the government still has “reasonable fiscal space”.

Become a smarter investor with CNBC Pro.

Get stock picks, analyst calls, exclusive interviews and access to CNBC TV.

Sign up today to start a free trial.