LATER this month America will receive its first shipment of Argentine lemons in 16 years, following the lifting of an import ban imposed by the Department of Agriculture in 2001. The resulting export squeeze had seen relations sour between the countries, something Donald Trump himself was very aware of: “One of the reasons he’s here is about lemons. And I'll tell him about North Korea, and he'll tell me about lemons,” he said when Mauricio Macri, the Argentine leader, visited him in April. A resolution to the citrus wars was keenly awaited. America, which is the world's largest consumer of the fruit, can now source lemon from the fourth-largest producer. What prompted the original dispute, and why has peace broken out at last?

The dispute has deep roots. For most of the past century, imports of Argentine lemons were restricted under quarantine rules, for fear that fruit might bring in pests that could hurt American crops. When a relaxation was proposed in 2000, a consortium of growers in California and Arizona—which account for all of America’s domestic production—sued the agency responsible for protecting America’s plants and animals. Citrus, they argued, had become a bargaining chip in America’s desire to open Argentina to its exports; in their view the risk of contamination remained. The courts sided with the farmers, and the ban was reinstated in 2001. In the years that followed, lukewarm relations between the two countries did not help. Nor did export taxes imposed on producers by an Argentine government trying to shore up its disastrous finances. The dispute went to the WTO in 2012, as part of a bilateral tit-for-tat involving meat and other foodstuffs.

Elected president in 2015 on a pro-market mandate, Mr Macri has since eliminated most taxes on agricultural exports. His arrival has also prompted a rapprochement with the United States. After Mr Obama visited the Argentine capital in March 2016, American officials travelled to the country to inspect citrus orchards, prompting the administration to say in December that it would lift the ban. Mr Trump’s inauguration a few weeks later—and his threats to withdraw from the North American Free Trade Agreement—led Argentina to worry that the measure would be indefinitely delayed, after an initial 60-day stay on the decision was renewed in March. The ban was lifted in effect when it expired last month.

Two factors probably helped tip the balance towards a resolution: Mr Macri’s longstanding business relationship with Mr Trump, and the fact that Argentina has a trade deficit with America, rather than the other way around. Predictably, California’s citrus growers went bananas when they heard about the decision. Mr Trump’s conspiracy-minded critics suggest the move could be payback for the state’s strong support for Hillary Clinton in last year’s elections. They are probably reading too much into it. But even for advocates of free trade the truce leaves a bitter aftertaste: so far, the president’s most substantial justification for lifting the ban is that “the lemon business is big, big business”. Hardly sign of a deeply felt belief in trade liberalisation.