A 40-year-old Santa Barbara man became dehydrated after running out of water during a rigorous training run Monday evening and had to be rescued in the mountains above Carpinteria.

The man, who is training for the Pier to Peak competition, was returning from Divide Peak when he developed stomach cramps and dizziness after eating wild berries in an attempt to rehydrate and boost his energy, according to Drew Sugars, spokesman for the Santa Barbara County Sheriff’s Department.

The man called 9-1-1 shortly after 8 p.m. The Sheriff’s Department dispatched its Search and Rescue Team after conflicting information from the man and the cell phone’s GPS coordinates made it difficult to pinpoint the man’s location. Santa Barbara County Fire personnel also were called to respond.

Rescue crews used night-vision and infra-red locating equipment, and the man was instructed to hold up his lighted cell phone display toward the helicopter and to flick his cigarette lighter so the night vision would pick up the light, Sugars said.

Paramedics reached the man about 9:30 p.m. He was evaluated, then taken to the Santa Ynez Airport for transport by ambulance to the hospital.

Noozhawk managing editor Michelle Nelson can be reached at mnelson@noozhawk.com.