LONDON -- When European Union chief Ursula von der Leyen visited Britain last week, some joked on social media: Can you please bring us some tomatoes?

People in the U.K. have had to ration salad staples like tomatoes and cucumbers for the past two weeks amid a shortage of fresh vegetables. Shelves of fresh produce in many stores have been bare, and most major supermarkets have imposed limits on how many salad bags or bell peppers customers are allowed to buy.

Officials blame the problem on recent bad weather in Spain and North Africa, saying the shortages could persist for up to a month. But many people were quick to point out that other European countries don't seem to be suffering the same challenges, leading some to wonder if it was a consequence of Britain's divorce from the EU.

Britain's government has rejected the suggestion that Brexit is to blame. But shoppers aren't happy, and Environment Secretary Therese Coffey's suggestion that consumers should "cherish" British produce and eat more turnips instead of imported food drew widespread mockery.

Experts say Brexit likely played a part in the food shortage, though a more complex set of factors -- including climate change, the U.K.'s overreliance on imports during the winter, soaring energy costs and the competitive pricing strategies at British supermarkets -- are more salient explanations.

A look at some of the factors contributing to what one European broadcaster has called Britain's "vegetable fiasco":

COLD WEATHER, HIGH ENERGY BILLS

Unusually cold temperatures in Spain and heavy rain and flooding in Morocco -- two of the biggest tomato suppliers to the U.K. -- have led to poor yields and are cited as the primary cause of the shortage.

In Spain, farmers blame recent freezing temperatures following record heat and dry conditions last year.

In the southern province of Almeria, which grows 40% of Spain's fresh vegetable exports, the production levels of tomatoes, cucumbers and eggplants fell by over 20% during the first three weeks of February compared with the same period in 2022, according to FEPEX, an organization representing Spanish fruit and vegetable exporters. The group said the situation is improving.

Heat and drought in Europe last year also are affecting vegetable harvests in other countries, including Germany.

Separately, the Netherlands, another major tomato producer, has seen a drop in output because skyrocketing energy bills tied to Russia's war in Ukraine meant many growers couldn't justify the cost of turning on the LED lights in their greenhouses this winter.

Vegetable growers in the U.K. have reported that they, too, were forced to leave their greenhouses empty.

Richard Diplock, managing director at the Green House Growers based in southern England, said his energy costs are some six times higher compared with previous winters.

"We made the decision that we couldn't afford to heat the greenhouses in December and January, and we've held back planting until February. Lots of tomato growers are in a similar position," he said.

BLAMING BREXIT

The shortages in Britain -- and contrasting pictures of full vegetable shelves in supermarkets in mainland Europe -- led to a degree of Brexit schadenfreude in some EU news outlets.

Experts say extra bureaucracy and costs associated with Brexit have played a part, though they stress it's not a main factor.

"One hypothesis for fewer exports to the U.K. is that if supply is constrained, why would you go to extra paperwork (to export to Britain)?" said Michael Winter, a professor of agricultural change at the University of Exeter. "If transaction costs are greater for exporting to one country compared to another, that's going to dictate where you go."

"Brexit has exaggerated the problem, without a doubt," Winter added. "But I don't want to overplay that. It's more to do with climate change and lack of investment in our industry."

SUPERMARKET PRICING

Farmers say another factor is how Britain's biggest supermarkets have sought to stay competitive by keeping prices as low as possible even as food costs have spiked, a major driver of inflation that's at the highest levels in decades.

In some EU countries, like Germany, there are no empty shelves, but the prices for fresh vegetables have shot up massively. British supermarkets are reluctant to pay more or charge customers so much, Diplock said.

"Being in the U.K., you know every week the price of a cucumber is 75p ($0.90) no matter what time of year it is," Diplock said. "North African and Spanish producers will see a better return for supplying European supermarkets."

"WHERE'S THE INVESTMENT?"

Even if energy costs hadn't risen so much, British growers would not come close to making up for the shortfalls in imported produce, Diplock said.

During the winter, domestic U.K. production only accounts for 5% or less of tomatoes and cucumbers sold in British supermarkets.

The National Farmers' Union has warned for months that overreliance on imported fresh produce leaves the U.K. vulnerable to unpredictable weather events and other external factors like the war in Ukraine.

Farmers also have complained about the lack of government investment in the sector and funding to help them cope with painfully high energy bills.

The government has spent billions to help consumers and businesses as European natural gas prices soared to record highs on Russia's curtailed supplies.

"The bigger question is why have we, in this country, neglected horticulture," Winter said. "This is a bit of a wake-up call."

------

AP writers Joseph Wilson in Madrid and Frank Jordans in Berlin contributed to this report