SAN DIEGO — Migrants trying to get to the United States from Mexico face a number of perils, from violent smugglers to merciless desert heat, but on Thursday and Friday they faced a cold, wet pre-winter storm that was connected to one death and 22 rescues in San Diego County.

Early Friday, a body was found by a U.S. Border Patrol agent less than a mile north of the border, where the Tijuana River meets the Pacific in Imperial Beach, U.S. Customs and Border Protection said in a statement. The San Diego County Sheriff's Department was investigating.

Officials also made a number of rescues in the hard rain that produced more than one-fifth of the area's annual precipitation.

Brave #USBP Agents and San Diego Fire-Rescue, saved 20 people from dangerous water flows on Thanksgiving night. One of the people rescued was a 17-yr-old boy. Smugglers risk the lives of those they exploit and emphasize profit over safety. #HonorFirst @CBPhttps://t.co/T6rU7WzxS3 pic.twitter.com/QGafC6u31k — CBP San Diego (@CBPSanDiego) November 29, 2019

The first rescue happened after 11 p.m. Thursday when an agent on patrol found three people in a drainage "tube" about two miles west of the San Ysidro border crossing, according to CBP.

They told the agent there were more people inside, some who had fallen and others who were yelling for help, the agency said. Ultimately 17 people were pulled out, some through a manhole.

"Agents contacted San Diego Fire & Rescue to help rescue the people from the drainage tube as the water was beginning to rise due to heavy rainfall," the CBP said.

At 1 a.m. Friday, a woman was discovered in the same tube, yelling for help, the agency said. Agents and city first responders found her along with two others, it said.

All of those rescued, including an unaccompanied minor and three women, were being processed for allegedly crossing the border illegally, the CBP said. Eight were hospitalized.

"The lifesaving efforts of these agents, who bravely risk their own lives to save others, makes me proud," said San Diego Chief Patrol Agent Douglas Harrison.

In a separate incident, two people, including a teenager, were rescued in the federal Otay Mountain Wilderness in eastern San Diego County late Friday morning, according to a California Department of Forestry and Fire Protection incident report.

Rescuers assisted the U.S. Border Patrol with the operation. CBP spokesman Ralph DeSio said by email the duo was suspected of crossing into the United States illegally.

The pair, a mother and her 16-year-old daughter, were lost without food or water in the mountainous area southeast of Otay Lakes Reservoir, officials said. They were pulled out of the area via helicopter and then treated at a hospital for hypothermia, according to Cal Fire.

"This is the second remote area rescue on the Otay Mountain Range in the last 24 hours, all have been weather related," the agency said in its report.