The UK could shake off the near-term impact of Brexit to become the fastest-growing economy in the G7 group of rich countries between now and 2050, according to a report that paints a bright outlook for the country’s prospects outside the EU.

Consultants PwC say the UK economy will not escape entirely unscathed from the decision to leave the bloc and that it will dampen growth prospects in the short term. But the brunt of the impact would be felt by 2020 and in the years that follow the UK would outperform its peers thanks to its relatively large working age population and its flexible economy.

PwC sets out the UK’s prospects in its latest report into how the world economy will look in 2050. Using models that analyse population trends, investment, education and technological progress, PwC economists expect six of the seven largest economies by 2050 will be emerging markets, led by China.

They see the UK economy remaining in the top 10, slipping down one spot from ninth place now to 10th in purchasing power parity (PPP) terms, which adjusts for price differences between countries to provide a measure of the volume of goods and services produced by an economy.

France is forecast to drop out of the top 10, to 12th place in 2050, while Germany is forecast to fall from fifth place to ninth. Mexico is the only newcomer to the top 10 in 2050.

PwC says the UK’s performance will depend on it setting up strong trading arrangements and remaining open to “talented workers” from around the world.

“Our relatively positive long-term growth projection for the UK is due to favourable demographic factors and a relatively flexible economy by European standards,” said John Hawksworth, chief economist at PwC.

“However, developing successful trade and investment links with faster-growing emerging economies will be critical to achieving this, offsetting probable weaker trade links with the EU after Brexit.”

With annual average growth of about 1.9% over the period to 2050, the UK is projected to be the fastest-growing economy of the G7, which comprises it, the US, Canada, France, Germany, Italy and Japan.

PwC’s projections see the world economy doubling in size by 2042, growing at an average annual rate of 2.5% to 2050. But it adds a note of caution that the forecasts are based on some basic assumptions.

“We assume broadly growth-friendly (but not perfect) policies and no major civilisation-threatening global catastrophes (eg nuclear war, asteroid collisions) over the period to 2050,” the report said.

In PPP terms, China is already the world’s largest economy and will continue to be so in 2050, by a significant margin, the report said. Emphasising the role of emerging economies in driving growth and taking an increasing share of the global economy, the report also predicted India could have edged past the US into second place by then, with Indonesia rising to fourth place.

But the picture is very different when economies are ranked by GDP per person, which is seen as a better gauge of how growth is translating into changes in living standards.

By that measure, the US is still the world’s leading economy in 2050 followed by Germany, the UK and Canada. But China and India are closing the income gap with those at the top, according to PwC’s projections.

“In 2016, US GDP per capita was almost four times the size of China’s and almost nine times the size of India’s. By 2050, these gaps are projected to close to around double China’s and around three times India’s, demonstrating long-term income convergence,” the report said.

The consultancy firm’s long-term optimism about the UK economy is in contrast to its more gloomy near-term forecasts for the effects of a Brexit vote, published with pro-remain business group the CBI before the referendum.

Its analysis in March last year warned that leaving the EU would cause a serious shock to the UK economy that could lead to 950,000 job losses and leave the average household £3,700 worse off by 2020.

Since the referendum, most economic outlooks have been shown to be overly pessimistic and forecasters, including the Bank of England, have been forced to revise up their predictions for UK growth.

Hawksworth conceded that after unexpected events in 2016, it may appear odd to make predictions for as far out as 2050. But he said there was an important role for such long-range forecasting.

“After a year of major political shocks with the Brexit vote and the election of President Trump, it might seem brave to opine on economic prospects for 2017, let alone 2050,” he said.

“But a long-term view is crucial for considering areas like pensions, healthcare, energy and climate change, housing, transport and other infrastructure investment. By looking beyond unpredictable short-term economic and political cycles and focusing on fundamentals, long-term growth projections can actually be more reliable than short-term forecasts.”