EL PASO, Texas (AP) — President Joe Biden walked a muddy stretch of the U.S.-Mexico border and inspected a busy port of entry Sunday on his first trip to the region after two years in office, a visit shadowed by the fraught politics of immigration as Republicans try to blame him for the record numbers of migrants crossing into the country.

At his first stop, the president observed as border officers in El Paso demonstrated how they search vehicles for drugs, money and other contraband. Next, he traveled to a dusty street with abandoned buildings and a small playground. Near the street was a metal border fence that separated the U.S. city from Ciudad Juarez. Biden walked slowly along the border wall, initially joined by two Border Patrol agents.

In a sign of the deep tensions over immigration, Texas Gov. Greg Abbott, a Republican, handed Biden a letter upon his arrival in the state that said the "chaos" at the border was a "direct result" of the president’s failure to enforce federal laws. Biden later took the letter out of his jacket pocket during his tour, telling reporters, "I haven’t read it yet."

Asked what he's learned by seeing the border firsthand and speaking with the officers who work along it, Biden said: "They need a lot of resources. We're going to get it for them."

Immigration for years has been a serious point of conflict, exposing both the dysfunction of the U.S. system as well as the turmoil within migrants’ home countries that has pushed many to flee. Administration officials have tried to counter Republican criticism by saying Congress should work with them to increase border security funding and overhaul immigration policy.

Biden was spending just a few hours in the city, which is currently the biggest corridor for illegal crossings, in large part due to Nicaraguans fleeing repression, crime and poverty in their country. They are among migrants from four countries who are now subject to quick expulsion under new rules enacted by the Biden administration in the past week that drew strong criticism from immigration advocates.

The president also was to visit the El Paso County Migrant Services Center and meet with nonprofits and religious groups that support migrants arriving to the U.S. It was not clear whether he would talk to any migrants.

Biden’s announcement on border security and his visit to the border are aimed in part at quelling the political noise and blunting the impact of upcoming investigations into immigration promised by House Republicans. But any enduring solution will require action by the sharply divided Congress, where multiple efforts to enact sweeping changes have failed in recent years.

From El Paso, Biden was to continue south to Mexico City, where he and the leaders of Mexico and Canada will gather on Monday and Tuesday for a North American leaders summit. Immigration is among the items on the agenda.

In El Paso, where migrants congregate at bus stops and in parks before traveling on, border patrol agents stepped up security before Biden’s visit.

"I think they're trying to send a message that they're going to more consistently check people's documented status, and if you have not been processed they are going to pick you up," said Ruben Garcia of the Annunciation House aid group in El Paso.

Migrants and asylum-seekers fleeing violence and persecution have increasingly found that protections in the United States are available primarily to those with money or the savvy to find someone to vouch for them financially.

Venezuelan migrant Jose Castillo, who said he traveled without family members for five months from his home on Margarita Island to arrive in El Paso on Dec. 29, said he hoped Biden "will take us into consideration as the human beings we are."

Castillo was among a group of about 30 migrants who gathered for prayers Sunday morning outside the Sacred Heart Catholic Church where many of the newcomers have been camping.

"We have suffered a lot since entering the jungle of the Darien Gap and passing through Mexico. It has all been a battle, battle, battle," he said. "I know that we are here illegally, but please give us a chance."

The numbers of migrants crossing the U.S.-Mexico border has risen dramatically during Biden's first two years in office. There were more than 2.38 million stops during the year that ended Sept. 30, the first time the number topped 2 million. The administration has struggled to clamp down on crossings, reluctant to take hard-line measures that would resemble those of former President Donald Trump’s administration.

The policy changes announced this past week are Biden’s biggest move yet to contain illegal border crossings and will turn away tens of thousands of migrants arriving at the border. At the same time, 30,000 migrants per month from Cuba, Nicaragua, Haiti and Venezuela will get the chance to come to the U.S. legally as long as they travel by plane, get a sponsor and pass background checks.

The U.S. will also turn away migrants who do not seek asylum first in a country they traveled through en route to the U.S. Migrants are being asked to complete a form on a phone app so that they they can go to a port of entry at a pre-scheduled date and time.

Homeland Security Secretary Alejandro Mayorkas told reporters aboard Air Force One that the administration is trying to "incentivize a safe and orderly way and cut out the smuggling organizations," saying the policies are "not a ban at all” but an attempt to protect migrants from the trauma that smuggling can create.

The changes were welcomed by some, particularly leaders in cities where migrants have been massing. But Biden was excoriated by immigrant advocate groups, which accused him of taking measures modeled after those of the former president. Administration officials disputed that characterization.

For all of his international travel over his 50 years in public service, Biden has not spent much time at the U.S.-Mexico border.

The only visit that the White House could point to was Biden’s drive by the border while he was campaigning for president in 2008. He sent Vice President Kamala Harris to El Paso in 2021, but she was criticized for largely bypassing the action, because El Paso wasn’t the center of crossings that it is now.

President Barack Obama made a 2011 trip to El Paso, where he toured border operations and the Paso Del Norte international bridge, but he was later criticized for not going back as tens of thousands of unaccompanied minors crossed into the U.S. from Mexico.

Trump, who made hardening immigration a signature issue, traveled to the border several times. During one visit, he crammed into a small border station to inspect cash and drugs confiscated by agents. During a trip to McAllen, Texas, then the center of a growing crisis, he made one of his most-often repeated claims, that Mexico would pay to build a border wall.

American taxpayers ended up footing the bill after Mexican leaders flatly rejected the idea.