The head of the European Central Bank said Tuesday that it will move gradually to combat soaring consumer prices with interest rate hikes in July and September but will keep its options open to “stamp out” inflation if it surges faster than expected.

In a speech opening an ECB forum on central banking in Sintra, Portugal, bank President Christine Lagarde used strong terms as policymakers target inflation running at a record 8.1% in the 19 countries using the euro. With new inflation figures due out Friday, Lagarde said the bank is using the dual approach to be able to respond to economic uncertainty.

Russia’s war in Ukraine has led to surging energy and food prices that are higher than those seen in the 1970s and 1980s, and “given its energy dependence, the euro area is experiencing these shocks acutely,” Lagarde said.

“The size and complexity of these shocks are also creating uncertainty about how persistent this inflation is likely to be,” she said.

The bank has already announced it will end asset purchases that worked to boost the economy on Friday, and follow with its first interest rates hikes in 11 years at its meeting next month. It will also raise rates in September but is leaving the option open for a bigger hike than the quarter-point increase in July, in case inflation keeps spiking.

The ECB also is trying to avoid further hurting economic growth by acting too aggressively, having “revised markedly down our forecast for growth in the next two years,” Lagarde said.

But “there are obviously conditions in which gradualism would not be appropriate. If, for example, we were to see higher inflation threatening to de-anchor inflation expectations or signs of a more permanent loss of economic potential,” she said, “we would need to withdraw accommodation more promptly to stamp out the risk of a self-fulfilling spiral.”

Other central banks around the world, including the U.S. Federal Reserve, have moved quicker than the ECB to combat runaway inflation. But they face the threat of spurring a recession as they make borrowing more expensive, with Fed Chair Jerome Powell acknowledging last week that “it’s certainly a possibility.”

The Fed has raised rates three times this year, including an increase of three-quarters of a point that marked its biggest hike in nearly three decades, and has more planned. The Bank of England has raised rates five times since December.

Fed Chair Jerome Powell and Bank of England Governor Andrew Bailey will join Lagarde for a policy panel discussion at the ECB forum on Wednesday.