Echoing the divisive rhetoric of US President Donald Trump, an Argentine lawmaker has urged the country's president to build a wall along the Bolivian border to keep out illegal immigrants.

"I know that border very well, and a wall is the solution," said Senator Alfredo Olmedo during a televised debate, reported Panampost, and went on to back the immigration policies of Trump, who has pledged to build a wall along the Mexico-US border.

While Trump's anti-immigrant policies have caused mass protests in the US and across the world, at the other end of the Americas another real-estate developer turned president's actions to curb immigration are proving equally controversial.

Last week, Argentine president Mauricio Macri signed an executive order to stop foreign migrants entering the country and to deport foreign criminals.

The government claims it is to combat increasing drugs crime, which it blames on a wave of migration from its northern neighbours.

"Peruvian and Paraguayan citizens come here and end up killing each other for control of the drug trade," said Macri's security minister Patricia Bullrich this week. "A lot of Paraguayans, Bolivians and Peruvians get involved as either capitalists or mules, as drivers or as part of the drug trafficking chain."

The move sparked a furious response from the Bolivian government.

"We have to reject this kind of stigmatization against our compatriots that coincides with Trump's xenophobic attitude," responded Bolivian government minister Carlos Romero.

Bolivia's indigenous president Evo Morales also criticised the policy, writing on Twitter: "We can't be following the example of the north and its policies, building walls to divide us."

Bolivian defence minister Reymi Ferreira said that Olmedo's statements constitute a "hasty policy" that could generate "xenophobia and discrimination and racism".

Olvedo's suggestion is unlikely to be taken up in the near future, as no Argentinian political party has come out in support of the policy.