El Salvador’s President Nayib Bukele, right, said he and Secretary of State Mike Pompeo agreed to work together to keep Salvadorans at home. (Salvador Melendez/AP)

Secretary of State Mike Pompeo completed a four-day trip to Latin America on Sunday with an upbeat visit to a country President Trump said “hasn’t done a thing for us” but send criminal migrants and was undeserving of U.S. assistance.

“We can’t force them to give us free money,” Salvadoran President Nayib Bukele said with a shrug and a smile at a news conference in the capital with Pompeo. Asking for handouts, he said, was “tacky.”

Instead, Bukele, who has been in office for less than two months, said he and Pompeo agreed they would work together to keep Salvadorans at home.

“They like that goal and want to help us in that goal,” Bukele said of the Trump administration. “The problem starts with us, because we are sending the migrants.”

A clearly pleased Pompeo made no promises on aid but spoke enthusiastically about increased U.S. cooperation and private investment. “This is a country that can be a model on migration,” he said, “We can get it right.”

Pompeo arrived in El Salvador after meeting in Mexico with Foreign Minister Marcelo Ebrard on the eve of a Monday deadline Trump set for imposing new tariffs on Mexico unless it took steps to dramatically decrease the number of migrants arriving at the southern U.S. border.

Pompeo, after his later meeting with Bukele, said that Mexico had “made real progress” but that “we’ve got a long way to go yet.” He said he would talk to Trump after returning to Washington on Monday and decide “exactly which tools and exactly how to proceed.”

The secretary’s trip, with stops in Argentina and Ecuador, in addition to Mexico and El Salvador, was part of an administration effort to improve ties with Latin America. Although Trump has visited Latin America only once during his presidency — late last year at a Group of 20 meeting in Argentina — both Pompeo and Vice President Pence have each made several trips.

“America proves our commitment by showing up, and we will continue to be here and continue to show up,” Pompeo said during a news conference Friday in Guayaquil with Ecuadoran President Lenín Moreno. Moreno last year replaced a leftist president whose eight-year tenure led to estrangement from Washington, and Pompeo’s brief visit was intended to demonstrate that the administration is ready to embrace the new government.

The increased attention to the region has reawakened, at least in some parts of Latin America, a desire to rebuild a once-close relationship with the hemispheric superpower, after years during which China has made deep economic inroads and Russia has taunted U.S. dominion with its claim to Venezuela.

For the administration, beyond Trump’s disdain for the Central American countries that have sent record numbers of migrants to the United States through Mexico, the region offers an opportunity to prove it can conduct a more traditional brand of diplomacy amid challenges from Asia, the Middle East and Europe.

During Pompeo’s visit, Bukele’s government signed a five-year extension of a long-standing agreement for U.S. drug interdiction flights to operate from the international airport in San Salvador. But it was unclear whether Bukele’s eagerness to cooperate on counternarcotics as well as migration, crime and other issues would temper Trump’s dismissal of what’s known as the Northern Triangle of Guatemala, Honduras and El Salvador.

In March, Trump announced he was canceling about a half-billion dollars in foreign assistance to those countries. The decision was at least partially reversed last month, when law enforcement and counternarcotics aid would be continued. But last week, the State Department notified Congress that it intended to reprogram about $41 million in nonmilitary assistance from Central America to assist Juan Guaidó, the U.S.-recognized interim president of Venezuela in efforts to oust Nicolás Maduro, who is backed by Russia and Cuba.

In Argentina, Pompeo attempted to give a boost to President Mauricio Macri, who faces a tough reelection battle in October, as promised economic progress has been slow to materialize. The administration has offered increased government-backed private investment and hailed Argentina’s designation of Hezbollah as a terrorist organization — the first Latin American country to do so.

Pompeo’s Mexico visit was his third and came on a relatively high point amid the ups and downs of the migrant crisis. In June, Mexico’s government promised to increase its efforts to stop U.S.-bound migrants traveling through the country and to negotiate a new asylum accord, in an effort to head off Trump’s threat to impose tariffs on Mexican exports.

After Trump’s threat, Mexico deployed 6,500 members of its new National Guard to its southern border with Guatemala, and around 15,000 more security forces, including soldiers, to its northern border.

Since then, detentions of migrants in Mexico have soared, and deportations of those without legal status have sharply increased. Last month, Mexico said it deported 21,912 foreigners, nearly three times as many as in the same month in 2018, and a 32.7 percent decrease from May.

“We have fulfilled all our commitments,” Ebrard, the foreign minister, said in a news conference Friday.

But last week, before the deadline was reached, Trump decreed a unilateral policy under which access to the U.S. asylum system would be sharply restricted for anyone who did not seek protection from other countries they passed through before crossing the southern U.S. border.

Under the rule, Guatemalans who pass through Mexico are barred from applying for asylum unless Mexico has already rejected them. Salvadorans and Hondurans would have to have been rejected by both Guatemala and Mexico.

Mexico has objected to the policy, which is under challenge in U.S. courts, and has repeatedly said it would not agree to a “safe third country” accord. Guatemala rejected such an agreement last week.

After the meeting with Pompeo, Mexico’s Foreign Ministry issued a statement saying that the session was “cordial” and “had positive results for both sides.”

On migration, the statement said, Pompeo “recognized the significant advances in Mexican operations” related to the agreement both countries reached on June 7.

Ebrard told his U.S. counterpart that, because of Mexico’s actions, “he didn’t consider it necessary to begin any type of negotiation” on an agreement to make Mexico the default country for asylum seekers headed for the U.S., the Mexican statement said.

Last week, Ebrard said that “Mexico doesn’t agree with measures that limit access to asylum and refugee programs for those people who fear for their lives and safety in their countries and face persecution.”

He emphasized that Mexico wants to also address the root causes of migration, including poverty. The government of Mexican President Andrés Manuel López Obrador has proposed an ambitious development plan for Central America, and the foreign minister said he would ask Pompeo for U.S. support.

Sheridan reported from Mexico City.