A mother attempting to climb over a fence on the US-Mexico border fell and was impaled on a steel bar in front of her children, officials said.

The 26-year-old woman from Guatemala pierced her side and buttocks when she landed on pieces of rebar Friday night near the San Ysidro Port of Entry, a border crossing between San Diego, Calif., and Tijuana, Mexico, US Customs and Border Patrol officials said in a statement.

Border Patrol agents in San Diego rescued the woman and she was taken to a hospital with minor injuries, the statement said.

Her two children, ages 3 and 5, were also taken to the hospital and later released into Border Patrol custody, officials said.

San Diego Sector Chief Patrol Agent Rodney Scott blasted the woman’s actions as “not only dangerous, but also very foolish.”

“This woman placed her own life and her children’s lives in peril,” Scott said in the statement.

The woman told agents she wasn’t part of the migrant caravan that’s made its way from Central America to the Mexican border town of Tijuana. Some migrants traveling with the caravan tried to breach a border fence Sunday and had tear gas fired at them by US agents.