Image copyright Reuters Image caption Could avocado supplies dry up in less than a month?

President Donald Trump has dropped a threat to close the border this week, instead giving Mexico a year to stem the flow of illegal drugs and migrants into the US.

Mr Trump said if Mexico has not clamped down on smuggling during that time, he would slap car duties on America's southern neighbour, and if that doesn't work, he would shut the border.

"We're going to give them a one year warning," he told reporters at the White House, "and if the drugs don't stop, or largely stop, we're going to put tariffs on Mexico and products, in particular cars."

He added: "And if that doesn't stop the drugs, we close the border."

But what would happen to people, and to trade, if a border closure were ever to go ahead?

Mexico is the United States' third-largest trading partner after Canada and China, so the impact would be widespread and immediate.

Media playback is unsupported on your device Media caption Trump: one-year warning for Mexico to stop drugs, people

Anticipated avocado shortages would just be one part of it.

Can a president shut the border?

Yes, says Matthew Dallek, an associate professor at George Washington University's Graduate School of Political Management in Washington DC.

"The president has wide latitude to control the flow of people and goods coming into the US," he says.

Image copyright Reuters

However, President Trump has vowed to close the border "for a long time" and this is where he might run into more difficulty, as there are likely to be multiple legal challenges on behalf of people and interests that are affected.

Mr Dallek compares it to President Trump's travel ban (often referred to as the Muslim ban), which he issued - via executive order - shortly after taking office. Its purpose was to stop refugees and people from several mainly Muslim countries from entering the US. The move was challenged in court.

"There would be far more chaos if the border was shut," says Mr Dallek. "You would have a pile-up of people and goods, and major political pressure. It would be unsustainable. He would be forced to retreat and reopen it, or the courts would step in."

Who could come off worse?

"It is a bit like a murder-suicide," says Andrew Selee, the president of the Migration Policy Institute, a think tank that describes itself as non-partisan. "You can hold a gun to the Mexican government, but it ricochets right back on to the US economy."

Paolo Marinaro, a postdoctoral scholar at the Center for Global Workers' Rights at Pennsylvania State University, agrees. "US and Mexico are highly integrated economies," he says. "Closing the border wouldn't affect only the US or Mexican workers, it would rather have massive effects on the global economy."

He cites the automobile industry as a prime example. "The sector employs more than one million workers in Mexico. And Mexico is the third largest global exporter of cars, providing cheap labour to global corporations," says Mr Marinaro.

Mexico's Foreign Minister, Marcelo Ebrard, tweeted on Friday that the country will "not act on the basis of threats".

The Mexican President, Andrés Manuel López Obrador, has also urged prudence.

"We are not going get confrontational with the government of the United States," he said.

Media playback is unsupported on your device Media caption 'I thought we would be treated differently in US'

The vast majority of migrants that President Trump is worried about come from Central American countries, and are just transiting through Mexico.

Mr Selee says Mexico has already been deporting more Central Americans than the US. "There are things they could do over time, but not instantly. They don't have greater capacity to do much more right now."

What will the impact be?

Many Mexicans and US citizens live and work across the two countries. Many are enrolled in programmes - such as the Trusted Traveller Programme - that allow them to fast-track immigration lines.

"It would throw a huge monkey wrench into people's lives if this were suddenly stopped," says Mr Selee, who is also the author of a book called Vanishing Frontiers, about the countries' deep links.

What about the avocados?

The kneejerk reaction from average US consumers has been to worry about potential avocado shortages, seeing as Mexico is one of the fruit's leading producers.

One executive told Reuters news agency that Americans would run out of avocados in three weeks if imports from Mexico were stopped.

Media playback is unsupported on your device Media caption On patrol with Mexico's avocado police

Steve Barnard, president and chief executive of Mission Produce, the largest distributor and grower of avocados in the world, said: "You couldn't pick a worse time of year because Mexico supplies virtually 100% of the avocados in the US right now.

"California is just starting and they have a very small crop, but they're not relevant right now and won't be for another month or so."

Mexico also exports tomatoes, cucumbers, blackberries and raspberries to the US.

"We're absolutely going to see higher prices," said Monica Ganley from Quarterra, a consultancy specialising in Latin American agricultural issues and trade.

"This is a very real and very relevant concern for American consumers."

But will it actually happen?

Despite the inevitable fallout, Mr Dallek thinks President Trump could go ahead with the plan.

"He shut down the government for over a month, and then he capitulated. He has also been forced to backtrack on family separations. A border closure would allow him to play to his more fervent supporters, so it looks like he is doing all he can, and then he could place the blame on the Democrats for stopping him," he says.

However, he thinks the president's advisers might guide him down a more nuanced route, involving slowing down traffic across the border rather than shutting it down altogether.

Mr Marinaro is less convinced that there will be action. "I don't see the threat of closing the border as any more real than the wall prototypes that he built for more than a year between San Diego and Tijuana, just to destroy them a couple of days ago," he says.

Meanwhile, Mr Trump's aides have denied that the president is simply posturing.

Speaking to ABC News on Sunday, acting White House Chief of Staff Mick Mulvaney said only "something dramatic" could convince Mr Trump to abandon his plans, while adviser Kellyanne Conway told Fox News the threat "certainly isn't a bluff".

The latest showdown on the US-Mexico border is Donald Trump negotiation at work. He makes a headline-grabbing threat - massive tariffs, "fire and fury" or, in this case, a total shutdown of the border - and uses it as a bludgeon to force his opponents to back down.

In reality the action, if there ever is one, often falls short of what was originally described in breathless news reports and feared in dire warnings from political opponents. The end result, whether good or bad, is frequently unclear.

Regardless of the outcome, the president claims victory and moves on.

Closing the entirety of the southern US border for any significant stretch of time would be a task of absurd complexity, with devastating economic consequences for states like Texas and California. What's more, it would do nothing to stop the flow of refugee-seekers, who claim asylum once they cross the Rio Grande and before they reach any border wall.

Mr Trump is making these threats to emphasise a point, leaving aides to figure out the details. It is, without a doubt, a different kind of diplomacy from a different kind of president. The jury is still out on whether he can succeed.