A Guatemalan migrant fell and was impaled on metal bars last week after she and her children tried to climb a wall on the United States border with Mexico, Customs and Border Protection said in a statement.

The agency said that “pieces of rebar” had pierced the woman, a 26-year-old who has not been publicly identified, in the side of her torso and in her buttock on Friday about a mile from an official border crossing at San Ysidro, Calif. It released a picture on Sunday that showed her lying on her back in the dirt, her face out of the frame, with someone lifting her limp body to reveal a dark pool staining the ground beneath her.

Rodney Scott, the chief patrol agent for the border agency’s San Diego sector, said the woman had risked her life climbing the border wall and could have died if not for emergency responders.

“Entering our country illegally, particularly over our walls is not only dangerous, but also very foolish,” Mr. Scott said in the statement. “This woman placed her own life and her children’s lives in peril.”