SAN JOSE, Costa Rica — U.S. Secretary of State Antony Blinken is trying to entice Central American nations to tackle the corruption and poverty that have helped drive a surge of migrants to the U.S.-Mexico border and presented an early challenge for the Biden administration.

In his first visit to Central America since taking office, America’s top diplomat has met with foreign ministers and leaders from the region and Mexico. On the two-day trip ending Wednesday, Blinken avoided publicly criticizing any particular government, focusing instead on Biden administration plans to distribute COVID-19 vaccines and other assistance, such as a proposed $4 billion aid package.

“We think that’s the best way to ensure greater stability and improve the lives of people across the region, which ultimately is in the United States’ interest as well,” Blinken said in a joint news conference with President Carlos Alvarado of Costa Rica.

The approach is a departure from the Trump administration, which reacted to an increase in migrants by expelling asylum-seekers to Mexico or Central America and stepping up efforts to build a wall along the American Southwest border, among other measures.

After a decline at the start of the pandemic, the number of apprehensions at that border began rising under Trump and swelled early in the Biden administration. The Border Patrol had more than 170,000 encounters, including 50,000 people traveling with families, its highest total since March 2001.

It was a major theme of the private talks Blinken had late Tuesday with the foreign ministers.

The U.S. hopes Mexican and Central American officials can do more to impede the trafficking of migrants, especially children. The Biden administration has been expelling single adults who cross the border and most families but it allows unaccompanied minors to enter the United States and pursue asylum or other legal claims for residency.

U.S. authorities encountered more than 17,000 children traveling alone along the border in April, compared with a record 18,960 a month earlier.

There are limits, however, to what Mexico and Central America can do amid the economic devastation of the COVID-19 pandemic. Leaders made it clear they hope for some of the 81 million vaccines that President Joe Biden has said he will distribute around the world. Details of the distribution plan are expected this month.

On Wednesday, Blinken met in private with his Mexican counterpart, Marcelo Ebrard, and visited a nongovernmental organization that provides children and families with recreational and educational activities and helps steer teens away from criminal activity. It’s the kind of organization that would get a piece of the $4 billion in the proposed aid package that the Biden administration does not want to give directly to government entities in the region.

Blinken suggested such organizations can play a role in persuading people not to migrate. “People should not make the dangerous journey to our border, but we know it is not enough to say, ‘Don’t come,’ ” he said. “We have to work together to make it safer for people across Central America to stay in their homes and communities without fear.”

Highlighting the relationship with Costa Rica enabled Blinken to contrast it with others in the region such as Honduras, whose president has been linked by U.S. prosecutors to drug trafficking, and Nicaragua, where the authoritarian government of President Daniel Ortega is under sanctions.

Blinken avoided direct remarks about El Salvador’s president, Nayib Bukele, a popularly elected leader who has a tense relationship with the U.S. because of his moves to consolidate power. Still, it was clearly on Blinken’s agenda when he said, “We meet at a moment when democracy and human rights are being undermined in many parts of the region.”