MEXICO CITY—Vice President Kamala Harris said at the conclusion of a trip to Mexico and Guatemala that she would visit the U.S. southern border and stressed that the reasons why migrants from Central America make the dangerous trip to the border would take time to resolve.

“The reality is that we need to prioritize what’s happening at the border, and we have to prioritize why people are going to the border, and so let’s talk about what’s going on in the places that are causing the issue at the border,” Ms. Harris said in a press conference Tuesday during her first trip abroad in office. “I think it’s short-sighted for any of us who are in the business of problem-solving to suggest we’re only going to respond to the reaction as opposed to addressing the cause.”

Ms. Harris’s comments came after Republicans criticized her for not yet visiting the border. Asked about the topic in an interview with NBC News, Ms. Harris said, “and I haven’t been to Europe.” She added: “I’m not discounting the importance of the border.”

During her trip, Ms. Harris repeatedly discouraged migrants from traveling to the southern U.S. border, while promoting U.S. economic investments in Central America and laying out new measures to tackle corruption in the region.

“Do not come,” Ms. Harris repeated during a joint press conference Monday in Guatemala, adding, “The United States will continue to enforce our laws and secure our border.”

The total number of illegal border crossings this year is on pace to hit a two-decade high. A record number of unaccompanied minors crossed the border illegally in March, followed by a slight decline in April.

“It’s short-sighted for any of us who are in the business of problem-solving to suggest we’re only going to respond to the reaction as opposed to addressing the cause.”

— Vice President Kamala Harris

Ms. Harris told reporters Tuesday she had a productive meeting with Mexican President Andrés Manuel López Obrador, which included a discussion on shared issues of security and migration. She also said temporary work visas as a way to expand legal pathways for migrants were part of the conversation.

The White House said after the meeting that Ms. Harris had agreed to some U.S. investments, including loans for affordable housing in southern Mexico, infrastructure projects and the coffee industry.

The U.S. has turned to Mexico to stop migrants before they get to the southern border. The Biden administration also has pressured Mexico to accept more migrant families and single adults turned away from the U.S. under an emergency health order, Mexican officials said. Ms. Harris said she didn’t discuss the order, known as Title 42, with Mr. López Obrador.

Mexico has resisted that pressure, which is part of a U.S. diplomatic push to stem a surge of migrants. Secretary of State Antony Blinken met with Central American and Mexican foreign ministers in Costa Rica last week.

The U.S. administration said it would also form a new task force, led by the Justice Department, to pursue investigations, prosecutions, and asset recoveries relating to corruption and to train regional law-enforcement officials. It is aimed at combating human smuggling and trafficking groups. The task force, which will work with the Department of Homeland Security and State Department, was announced after Ms. Harris’s meeting with Guatemalan President Alejandro Giammattei on Monday.

After Ms. Harris met with Mr. Giammattei, U.S. officials announced a task force to combat corruption.

After Ms. Harris met with Mr. Giammattei, U.S. officials announced a task force to combat corruption.

Photo: jim watson/Agence France-Presse/Getty Images

“This is about transnational crime, and we have to follow the money,” Ms. Harris said Monday. “And we have to stop it.”

Democratic and Republican administrations have struggled to find long-term solutions to handling surges in migrants from Central America, including efforts to curb corruption. Many migrants say they continue to be driven by poverty and violence in their home countries. The region was hit hard last year by two disastrous hurricanes.

El Salvador, Honduras and Guatemala—known as the Northern Triangle countries—are among the most corrupt in the world, according to Transparency International’s annual Corruption Perceptions Index, a global survey of 180 countries.

“People lose trust in the institutions and they feel that they can’t get a fair shake as they’re trying to proceed through the course of their lives and their businesses,” Nancy McEldowney, Ms. Harris’s national security adviser, said in a briefing with reporters Sunday.

The administration aims to reduce over time those countries’ reliance on U.S. foreign aid and to boost involvement from the private-sector and nonprofit institutions in a way that can circumvent corrupt government officials and outlast shifts in U.S. policy and aid between administrations, aides to Ms. Harris have said.

U.S. and Mexican officials discussed security and migration on Tuesday in Mexico City.

U.S. and Mexican officials discussed security and migration on Tuesday in Mexico City.

Photo: Jacquelyn Martin/Associated Press

Sen. Bill Hagerty (R., Tenn.), who recently visited the region, said political leaders told him securing the U.S. border was their most immediate concern—more so than corruption—and that the Biden administration had sent mixed signals about border security and enforcement.

“We need a new approach,” he said. “Just sending money down there again through NGOs—we’ve already proven that that’s wholly ineffective.”

Theresa Brown, managing director of immigration and cross-border policy at the Bipartisan Policy Center, a Washington think tank, said the anticorruption measures and Ms. Harris’s comments discouraging migrants would have little effect on the migrant surge.

“Public messaging almost never makes a difference,” she said. “You can tell them how dangerous it is—it’s not like they don’t know that. Their calculation is that it’s more dangerous to stay, that the risk is worth it.”

Ms. Harris said the U.S. would invest $40 million over three years to launch an initiative for young, primarily indigenous women, in Guatemala through USAID, which will provide an additional $48 million for affordable housing and agribusiness in the country.

Mr. Biden’s recently released budget allocates $861 million to the region—part of a four-year plan totaling $4 billion.

Ms. Harris agreed with Mexican President Andrés Manuel López Obrador to some U.S. loans for affordable housing, infrastructure projects and the coffee industry in Mexico.

Ms. Harris agreed with Mexican President Andrés Manuel López Obrador to some U.S. loans for affordable housing, infrastructure projects and the coffee industry in Mexico.

Photo: carlos barria/Reuters

A United Nations-led antigraft commission was shut down in 2019 in Guatemala, which is considered to be the U.S.’s strongest ally of the three Northern Triangle countries.

In Honduras, the government ended the mandate of a similar task force last year, and the younger brother of Honduras President Juan Orlando Hernández was found guilty of trafficking more than 200 tons of cocaine in a trial that revealed deep links between drug cartels and top officials in Central America.

And in El Salvador, the country’s populist—and popular—president, Nayib Bukele, won a broad majority in parliament in March elections, allowing his party to dismiss five top judges and the attorney general. A senior State Department official said Mr. Bukele appears to be relying on his popularity at home to weather governance criticism from Washington.

Mr. Biden in March delegated to Ms. Harris diplomatic efforts with Mexico and the Northern Triangle. In April, she announced the administration would send $310 million to address food insecurity and for humanitarian relief. The vice president also recently unveiled agreements from 12 companies and organizations, including Microsoft Corp. and Mastercard Inc., to invest in the region.

Write to Tarini Parti at Tarini.Parti@wsj.com