LONDON - Britain's economy grew at its slowest annual pace in nearly seven years in October, offering a weak backdrop to Thursday's national election in which both leading parties are promising to boost growth.

The approach of a Brexit deadline and the global economic slowdown hit Britain's factories and construction industry in the month, official data showed on Tuesday.

Gross domestic product rose by 0.7% compared with Otober 2018, the weakest growth since March 2012 when Britain was still trying to shake off the effects of the global financial crisis.

In the three months to October, growth flatlined compared with the previous three-month period, the Office for National Statistics said, as expected by economists in a Reuters poll.

The economy also showed no change in monthly terms, the ONS said, weaker than a median forecast of 0.1% growth in the poll.

Britain's economy avoided falling into a pre-Brexit recession over the summer when it grew by 0.3% in the three months to September.

But it has shown signs of slowing since then as an Oct. 31 deadline for leaving the EU - which has since been extended - approached.

Further uncertainty about the outcome of the Dec. 12 national election is likely to have caused more caution among businesses since then.

Prime Minister Boris Johnson has urged voters to back him and his Brexit deal, saying it would "unleash a great tide of investment" into Britain when it clears a currently deadlocked parliament.

But worries about a chaotic exit from the EU are unlikely to vanish even if Johnson wins the election because he has ruled out asking Brussels to extend a transition period if a deal for future trade ties has not been agreed by the end of 2020.

The opposition Labour Party has said it will hold a fresh Brexit referendum after negotiating a new Brexit deal, potentially offsetting some of the concerns among many businesses about other Labour policies including higher corporate taxes and nationalisation of some key industries.

The ONS said industrial output fell by 0.7% in the three months to October while Britain's large services sector grew by 0.2%, its weakest increase since June.

Separately, the ONS released trade data which showed Britain's goods trade deficit widened by more than expected to nearly 14.5 billion pounds in October from 11.5 billion pounds in September.

Economists in the Reuters poll had expected a deficit of 11.65 billion pounds in October.

The ONS said the approach of the Oct. 31 Brexit deadline - which has been extended to Jan. 31 - appeared to increased imports and exports in October but by less than before the original Brexit deadline at the end of March.

(Reporting by William Schomberg and Andy Bruce) ((uk.economics@reuters.com, Tel +44 207 542 7748))