PARIS — When a coronavirus variant forced Britain into lockdown in December, it triggered alarm across Europe. Within hours, France, Germany and other countries shut their borders or imposed restrictions, leaving thousands of travelers and lorry drivers stranded.

But almost two months on, the European Union’s two most populous nations are increasingly divided over how to confront more highly transmissible variants, including the ones first discovered in Britain and South Africa, that account for a growing number of infections.

Despite a drop in total recent coronavirus cases, German Chancellor Angela Merkel and state leaders on Wednesday extended the country’s lockdown for another month, with Merkel warning that the variants have significantly moved the goal posts.

But after arguing for weeks that France was probably also headed into another lockdown, French officials abruptly changed course this week, offering a far more optimistic assessment.

“It’s possible and desirable that we’ll never have to go back into lockdown,” French Health Minister Olivier Véran said this week, leaving some observers puzzled.

France now has more than twice as many new cases per capita as Germany does, and the highly transmissible B.1.1.7 variant, first detected in Britain, is estimated to account for up to 25 percent of new infections in the country, according to figures released Thursday. The variants first identified in South Africa and Brazil have also been detected in France, though they are less widespread.

“Do you have a hard time recognizing our government and its optimism right now?” a journalist with France’s public broadcaster wrote in a column Thursday. “Same here.”

Scientists have watched the U-turn with alarm. “The French approach is immensely dangerous,” said Tobias Kurth, the director of the Institute of Public Health at the Charité hospital in the German capital.

In defending their strategy, French officials have emphasized the adverse mental health and economic effects of lockdowns, with Véran saying every week without a lockdown “is a week with additional freedoms.”

Germans have been living under a tightening state of lockdown since early November, with schools and kindergartens shuttered and those who can do so working from home. Cafes and restaurants have been closed except for takeout, and some states have gone further and introduced nightly curfews.

Even though Germany at first struggled to bring down case numbers, they have steadily declined in recent weeks. From a peak of more than 36,000 daily cases in December, the country is now reporting fewer than 10,000 a day.

While the United States has also seen declining numbers without such strict measures, the German leadership attributes the progress to its restrictions.

More than 63,000 people have died of the coronavirus in Germany, compared with nearly 473,000 in the United States — more than seven times as many deaths, though the U.S. population is only four times the size.

Vaccination rates are ramping up while deaths and infections are dropping, Merkel told the German parliament Thursday.

“And if that were the whole picture, then you would see me here looking quite confident, even with all the difficulties,” she said. But the danger of the variants is there, if not fully visible yet and is “a great danger for this good path we are on.”

With that in mind, Germany raised its bar for new openings this week, from an average of 50 weekly infections per 100,000 people to 35 per 100,000. The country’s current rate is about 70 per 100,000.

Throughout much of January, French ministers had struck a tone similar to Merkel’s. Amid fears of a looming third wave of the virus in Europe linked to the new variants, France moved a curfew from 8 p.m. to 6 p.m. last month, ordered the closure of some shopping centers and banned nonessential travel from outside the European Union.

But schools, hotels and most shops have remained open. Employees still take crowded subways into offices. France’s quarantine policies are also less strict than Germany’s, and they’re enforced less than in Britain, where new arrivals will need to quarantine in government-approved hotels and risk 10-year jail sentences if they flout the rules.

Still, the number of new infections and hospitalizations in France slightly dropped over recent days. But scientists fear the numbers may provide a false sense of reassurance.

Whereas Britain and Denmark are among the nations that scan the most coronavirus infections for mutations, France and Germany have lagged behind.

In early January, large-scale testing showed that the variant first discovered in Britain may at the time have already accounted for about 1 percent of new cases in France, but the testing effort was limited to samples from only two days.

Some studies have suggested that the variants may have grown far more prevalent in some places since then, including the capital region, where the British variant could account for around 40 percent of new cases, according to one recent study.

German scientists have similarly sought to boost their virus sequencing in recent months, and they do not believe that the variants are currently dominant. But since testing was expanded in mid-January, the B117 variant has already been found in nearly 100 cases in Berlin.

“There are signs that the British virus variant, the corona mutation B.1.1.7, will prevail,” Johannes Danckert, head of Berlin’s Vivantes clinics, told the Tagesspiegel newspaper this week.

But whereas Germany could at least manage to slow the variants’ spread, France’s current approach may put it on track for a surge far sooner, said Kurth.

Morris reported from Berlin. Luisa Beck in Berlin contributed to this report.