RELATIONS between Venezuela, in radical socialist hands since the turn of the century, and its broadly pro-American neighbour, Colombia, have often been erratic and at times, literally explosive. In 2007 the first stretch of a gas pipeline linking the two countries was inaugurated, amid warm rhetoric about renewed amity. But in July it blew up, apparently because of lack of maintenance, and bilateral tensions of another kind soon flared. Previous crises have involved the dispatch of Venezuelan tanks to the border, and complaints from the Colombian government that leftist rebel fighters were being harboured in the neighbouring country. But the current quarrel is having a particularly dire effect on ordinary people, and it makes a mockery of the efforts of Juan Manuel Santos, Colombia’s president, to mend fences with his Venezuelan counterpart, Nicolás Maduro.

On August 19th, Mr Maduro closed the border crossings connecting Venezuela’s Táchira state with an adjoining department of Colombia, Norte de Santander. He said the aim was to stop the Colombian smugglers whom he blames for food shortages in his country. (It would be nearer the truth to say those smugglers thrive in cahoots with Venezuela’s National Guard.)

Beset by economic woes, including a plunge in oil revenues, and apparently in search of handy scapegoats, the Venezuelan leader declared a state of emergency in five municipalities that abut Colombia. (Another eight were then added.) He also told his police and National Guard to begin deporting Colombians living “illegally” in Venezuela. The mood darkened this week when Venezuela closed yet another border post, this one between Zulia state and Colombia’s La Guajira department.

According to the United Nations, nearly 1,500 Colombians were deported in the space of two weeks and more than 18,600 others have fled back to their homeland on their own. Even when the official deportations died down, the panic among Colombians living on the Venezuelan side of the border remained. Many waded through the Táchira river with belongings strapped to their backs. More than 3,400 people are crowded into 21 shelters in the Colombian city of Cúcuta.

Colombia is enraged, saying Venezuela has created a humanitarian crisis. At the UN and the Organisation of American States, it has denounced its neighbour for persecuting its nationals and trying to blame its economic incompetence on others. That last allegation may be well-founded; Mr Maduro has every reason to distract opinion ahead of elections in December that his Socialists may lose.

But picking a fight with Colombia may backfire on Mr Maduro, according to Maria Teresa Belandria, a professor of international law at the Central University of Venezuela. Some 5m of Venezuela’s 30m people are of Colombian descent and many are registered to vote. That is partly thanks to a political stunt by Mr Maduro’s fiery predecessor, Hugo Chávez, called “Mission Identity” in 2003; it involved giving thousands of temporary Venezuelan identity papers to immigrants in the hope of creating a grateful new constituency.

Even before Mr Maduro turned his ire on them, many Colombians in Venezuela were feeling disillusioned by their host country’s travails and keen to head home. At the Colombian consulate in Caracas, there has been a long queue of Colombians getting the papers they need to go back. They are not immediately affected by expulsions in the border area, but preparing to go home looks prudent.

Some have spent most of their lives in Venezuela, which attracted migrants when its economy was healthy. Omaira, a 67-year-old domestic worker in Caracas, said she moved to Venezuela more than 50 years ago in order to earn wages in a strong currency. The present crisis has put an end to that benefit; over the last 12 months, the Venezuelan bolívar’s value has plummeted more than 90% against the Colombian peso on the black market.

Colombia knows Omaira is not alone in her homesickness. Mr Santos’s government reckons that if, as expected, the current showdown continues to the end of the year, as many as 500,000 Colombians could return from Venezuela.

Mr Santos and Mr Maduro initially said they were ready to discuss ways of easing tension; but that was before the fresh border closure on September 7th. “When we open the door to dialogue, Venezuela responds by closing the border even more,” fumed the Colombian leader.