A 26-year-old mother from Guatemala was impaled by a rebar in front of her children when she fell while trying to climb a fence on the U.S.-Mexico border, U.S. Customs and Border Protection said. She was found near a San Diego border crossing and was treated for non-life threatening injuries.

The agency said the woman had fallen from the border wall about one mile east of the San Ysidro port of entry Saturday evening after she climbed over it to illegally enter the country. She landed on rebar that pierced her side and buttocks.

The woman was treated by paramedics and the San Diego Fire Department and then taken to a local hospital for according to the border patrol. Both children, ages 3 and 5, were also taken to a hospital to be checked for potential fall trauma.

Get Breaking News Delivered to Your Inbox

"Entering our country illegally, particularly over our walls is not only dangerous, but also very foolish," San Diego Sector Chief Patrol Agent Rodney Scott said in a statement. "This woman placed her own life and her children's lives in peril. She could have easily died if not for the quick response by our agents and EMS."

According to the statement, the area where the woman fell is an active construction site where 14 miles of wall are being installed to replace the decades-old landing mat wall — a type of barricade made up of surplus metal helicopter landing pads.

The children were later released to border patrol custody, the agency said. CBS News reached out to U.S. Customs and Border Protection seeking an update on the woman's health status, but did not get an immediate response back.

The incident happened Friday, two days before U.S. border patrol agents fired tear gas on hundreds of Central American migrants protesting near the border in Mexico after some attempted to get through fencing separating the two countries. U.S. authorities temporarily shut down border crossings in San Ysidro where thousands are waiting to apply for asylum.

President Trump defended the use of what he called "safe" tear gas on the migrants in remarks Monday night.

"First of all, the tear gas is a very minor form of the tear gas itself. It's very safe," he said at a roundtable event in Mississippi. "The ones that were suffering to a certain extent were the people that were putting it out there."