US President Donald Trump has ordered a wall built along the nearly 3,200km US-Mexico border.

PUERTO VARAS - Mexican presidential hopeful Andres Manuel Lopez Obrador filed a complaint with the Inter-American Commission on Human Rights on Wednesday against US President Donald Trump's planned border wall and his administration's treatment of immigrants.

Lopez Obrador, a fiery leftist who has led recent polls for the 2018 election, said he expects the commission to "speak out in accordance with the law to protect immigrants from the harassment they are suffering since Trump took office."

Trump has ordered a wall built along the nearly 3,200km US-Mexico border, has moved to strip federal funding from "sanctuary" states and cities harbouring illegal immigrants, and expanded the force of US immigration agents.

During his election campaign, Trump described Mexican illegal immigrants as rapists and criminals and insisted that Mexico would pay for the wall. That caused simmering diplomatic tension and angered everyday citizens south of the border.

Lopez Obrador, a former Mexico City mayor and two-time runner-up for the presidency, said he hoped the Inter-American Commission on Human Rights would view Trump's moves as a "violation of human rights and discriminatory."

The commission, an autonomous organ of the Organisation of American States (OAS), is tasked with promoting and protecting human rights in the American hemisphere.