Vice President Mike Pence played down reports of overcrowding and unsanitary conditions at two migrant detention centers in Texas that he visited on Friday, but he acknowledged the gravity of the humanitarian crisis unfolding along the United States’ southwestern border.

The tour gave journalists covering the vice president a rare glimpse inside a Border Patrol station near McAllen, Tex., where they observed nearly 400 men crammed inside a cage with no space to lie down and no mats or pillows, according to pool reports .

Before members of the news media were ushered out of the facility, some of the detainees shouted that they had been there for more than 40 days, were hungry and could not brush their teeth. One pool reporter described the stench as “horrendous” — some of the agents wore face masks — and said it was sweltering inside the detention center, which is less than 10 miles from the Rio Grande, the river that divides the United States and Mexico.

“I was not surprised by what I saw,” Mr. Pence said later at a news conference. “I knew we would see a system that was overwhelmed. This is tough stuff.”