In the three months to February, a less volatile measure in comparison to the monthly numbers, GDP also grew by 0.5% – up from 0.3% in the three months to January.
The National Institute of Economic and Social Research called the latest expansion in the economy “sizeable” but said it expected slower growth in March.
Associate economist Fergus Jimenez-England said: “Unfortunately, the latest energy price shock has likely pulled the rug on this momentum, with another year of above-target inflation and a softening labour market likely to come.”
Ruth Gregory, deputy chief UK economist at Capital Economics, said the “bumper” growth in February was “probably already extinguished” by the Iran war.
But she said it was encouraging that some of the sectors most exposed to the rise in energy prices had performed well, such energy-intensive mining, transport and retail.