By Paul Hannon and Jason Douglas

LONDON -- European governments have spent big keeping millions of workers on company payrolls during the pandemic. Now, the U.K. is set to find out what happens when that support is removed.

The U.K. government has said it would close the most costly of its coronavirus-support programs for businesses late next month, which would make the country among the first in Europe to do so. Britain thus will become a test case for how quickly the region's economies can wean companies off taxpayer support without seriously damaging the economy.

The U.K. gamble is that the economy will soon recover from its coronavirus-induced torpor, allowing idled workers to find new jobs and companies to invest for growth as profits recover.

The risk is that pulling the plug prematurely on the U.K.'s centerpiece job-support program drives up unemployment. That would have consequences for other businesses, since unemployed workers would have much less money to spend, and could snuff out a fledgling recovery.

"I'm very, very nervous about what happens when the job-retention scheme winds down," said James Watt, director of Scotland-based craft-beer company BrewDog PLC.

At the same time, economists worry that by providing support for too long, governments might keep businesses afloat that don't have a future in the post-pandemic world, employing workers who could be doing more useful things elsewhere.

The U.S. government has spent hundreds of billions of dollars on loans for struggling businesses and enhanced benefits for laid-off workers during the pandemic. European governments, by contrast, have largely sought to encourage companies to keep people on the payroll even when they have little or no work to do. Their job-retention programs -- which have already cost tens of billions of dollars -- typically involve payments to companies of most of the wages of idled workers, if those companies can show their revenues have fallen significantly.

The jury is out on whether the U.S. or the European approach is more effective. Government-imposed restrictions and individual efforts to avoid infection mean that for some time the global economy is likely to underperform.

That presents European governments with a difficult decision: continue to spend heavily on businesses that might not have a future, or withdraw support now and risk a surge in bankruptcies and unemployment.

The U.K. is preparing to take what economists believe is a big risk by closing its costliest support program at the end of October. Launched in April, the Coronavirus Job Retention Scheme has so far helped 1.2 million businesses pay the wages of a total 9.6 million workers, at a cost of GBP35.4 billion ($47 billion).

Without that help, businesses might have to fire workers if their revenues haven't returned to their pre-pandemic levels, or if they don't expect them to do so over coming months. That could ripple through the economy, affecting other companies that are gradually recovering from the pandemic.

Mr. Watt of BrewDog said revenue at the company's 51 bars in the U.K. is about 60% of its pre-Covid-19 level. In central London, where BrewDog's bars mostly cater to office staff relaxing after work, sales are 20% what they were before the pandemic.

At the height of the pandemic in April, the company had 890 of its 1,200 U.K. employees furloughed through the job-retention program as it fought to survive. All except 95, mostly bar staff, have now returned to work, Mr. Watt said, though around 100 accepted a redundancy package with terms including six months' wages and a case of beer a month for a year.

According to a survey conducted by the Office for National Statistics, 13% of the U.K.'s workforce was still on furlough at the start of August, equivalent to around 3.3 million workers. By comparison, the ONS estimates that the U.K. lost just 730,000 jobs between March and July.

Economists at JPMorgan Chase & Co. estimate that ending the jobs program would result in the loss of an additional 1.8 million jobs, helping to push the unemployment rate to 9% from just 3.9% in June.

Critics of the government's decision to end the initiative include the National Institute for Economic and Social Research, a U.K. think tank. It has warned that premature closure of the program will contribute to a rise in the jobless rate to 10%. The U.S. unemployment rate was 8.4% in August.

Similar measures in Spain and the Netherlands are scheduled to come to an end soon, although extensions are being considered. Germany will extend wage subsidies for furloughed workers by 12 months to the end of 2021, while France is set to offer support beyond October, albeit in a less generous form. Economists at UBS estimate Germany, France, Spain and Italy will together spend around EUR145 billion ($170 billion) on their programs this year.

The U.K. government believes the program is too costly to extend. The Office for Budget Responsibility, the U.K.'s fiscal watchdog, already estimates the budget deficit could swell to more than GBP300 billion for the fiscal year through March, or around 16% of national income. Moreover, the program might stop workers from moving into new jobs in growing areas of the economy, such as online grocery delivery, from struggling ones, such as restaurants.

Some economists say the program will be much less expensive to maintain as more businesses become able to employ their workers full time, while workers who lose their jobs as a result of its closure will be able to claim financial support from the government.

ONS estimates suggest many sectors are almost back to pre-pandemic levels of activity, with just 5.2% of retail workers and 8.9% of manufacturing workers still furloughed in early August. By contrast, more than half of all workers in the arts, entertainment and recreation sector remained on furlough.

In the manufacturing sector, WHS Plastics Ltd., a maker of plastic components for auto makers, is up and running again, albeit with a dimmer outlook. Having received help under the furlough plan, managing director Paul Nicholson said he laid off 160 of the company's 600 staff in July and the rest are back at work.

"We have a responsibility to right-size our business when we know what size the market is," he said.

The government's other argument for ending the program raises a big question that faces policy makers world-wide: When is it time to step aside, and let markets once again decide which businesses should flourish, and which fail?

"They need to evolve, or they could further decrease the capacity of our economies to reallocate capital and labor." said Laurence Boone, chief economist at the Organization for Economic Cooperation and Development.

Write to Paul Hannon at paul.hannon@wsj.com and Jason Douglas at jason.douglas@wsj.com