WASHINGTON — Top officials in the agency overseeing border security condemned a secret Facebook group for current and former Border Patrol agents that featured jokes about migrant deaths, obscene images of Hispanic lawmakers and threats to members of Congress as the lawmakers themselves on Tuesday amplified their criticism of the agency.

Carla Provost, the chief of the Border Patrol, sent an email to her agents describing the posts in the group as “highly inappropriate and offensive.” The Customs and Border Protection agency’s Office of Professional Responsibility and the Department of Homeland Security’s inspector general began an independent investigation into the posts, Ms. Provost said.

“The men and women of the U.S. Border Patrol are under immense pressure every day as you manage the crisis on our border,” Ms. Provost said in the letter, which the Department of Homeland Security made available on Monday night. “But let me be clear: There is absolutely no excuse for this kind of inappropriate behavior — on or off duty, publicly or privately.”

[Related: Inside the migrant detention center in Clint, Texas.]

She said any agents identified as writing the posts would be held accountable. ProPublica reported the existence of the secret Facebook group just as Democratic lawmakers toured Border Patrol facilities in Clint and El Paso, Tex., on Monday.