Britain's economy bounced back in August, official data showed Friday, boosting the new Labour government ahead of its maiden budget later in October.

Gross domestic product grew 0.2 percent in the reported month compared with July, when output stalled, the Office for National Statistics said in a statement.

The rise in economic growth was in line with analysts' expectations after GDP flatlined in June and July.

It also provides a timely boost to the new government which has put growth expansion at the top of its priority list.

"It's welcome news that growth has returned to the economy," said finance minister Rachel Reeves, who will present the budget on October 30.

Prime Minister Keir Starmer's Labour government won power at the start of July, ending 14 years of Conservative rule.

ONS director of economic statistics Liz McKeown said that while all the main sectors of the economy grew in August, "the broader picture is one of slowing growth in recent months, compared to the first half of the year."