Secretary of State Antony J. Blinken will travel to Mexico City on Wednesday to discuss a surge in illegal immigration as thousands of migrants trek through southern Mexico in a mass movement toward the United States.

Mr. Blinken will meet with President Andrés Manuel López Obrador at a time when border crossings have hit record numbers. There have been days this month when the Border Patrol encountered more than 10,000 people at the southern border.

Wednesday’s meeting will also include Alejandro N. Mayorkas, the homeland security secretary, and Liz Sherwood-Randall, the White House homeland security adviser.

A huge caravan that began its journey north on Sunday is a sign of the enormous challenges in stemming the tide of migration. Local officials and news media reports in Mexico estimate that somewhere between 6,000 and 10,000 people are making the trip.

The southern border has been a consistent political vulnerability for President Biden, who promised on his first day in office to “restore humanity and American values to our immigration system” after the broad restrictions of the Trump years.

But Mr. Biden has struggled to keep the numbers down, despite trying to institute limits on asylum access at the border and deporting migrants to Venezuela and Cuba.

Though migrant caravans have become a common phenomenon and are usually broken up by the authorities well before they reach the U.S. border, the latest march has received particular attention because of its timing, just ahead of Mr. Blinken’s visit.

The caravan, roughly 1,000 miles south of the U.S. border in the state of Chiapas, includes migrants from Honduras, El Salvador, Venezuela and Haiti, among other countries.

In November, a smaller caravan dispersed after officials took hundreds of the migrants to local shelters.

Republicans have stepped up their attacks on Mr. Biden over the border numbers, a potential vulnerability for the president as he seeks re-election next year. In Texas, Gov. Greg Abbott signed a law that authorizes law enforcement officials in his state to arrest migrants who cross without authorization. (El Paso County challenged the measure in federal court last week.) The president has also faced pressure from mayors in Democratic cities over the increase in migrants arriving in their cities.

Immigration has also become central in discussions in Congress over aid to Ukraine and Israel. Republicans have refused to approve the wartime aid without a new crackdown at the border.

The increase in border crossings in recent weeks has forced border officials to temporarily shut down railway crossings in El Paso and Eagle Pass, Texas, and to close the port of entry in Lukeville, Ariz. While the railway crossings were reopened, Biden administration officials plan to speak to Mexican officials about the port of entry closures, officials said in a statement.

Last week, Mr. López Obrador briefed reporters about a call with Mr. Biden in which they agreed more enforcement at the border is needed.

“Now we have an extraordinary situation because the number of migrants passing through our country with the purpose of reaching the United States has increased,” he said, adding that Mexico was “going to help, as we always do.”

Mr. López Obrador said he shared with Mr. Biden an aim of reinforcing containment measures in southern Mexico so that migrants and asylum seekers do not reach the border.

The other necessary component, he said, is to try to address the root causes of migration and help solve political disputes in the region.

U.S. Customs and Border Protection officials announced on Friday that there were more than 190,000 apprehensions between ports of entry in November. U.S. officials said they have “removed or returned” more than 400,000 people between May and the end of November.

“We are facing a serious challenge along the southwest border and C.B.P. and our federal partners need more resources from Congress — as outlined in the supplemental budget request — to enhance border security and America’s national security,” said Troy Miller, the acting leader of the border agency, in a statement on Friday.