Two 17-year-old boys in Northern California died when they grabbed onto an electrified bridge after jumping into an irrigation canal to rescue a dog swept up in the swift current, authorities said Tuesday.

Jacob Hourmouzus and Jacob Schneider died of electrocution at a hospital on Monday, according to the Solano County Sheriff's Department. The dog was injured but survived.

GIRL, 5, PRESUMED DROWNED AFTER VANISHING IN CALIFORNIA RIVER; SEARCH REDUCED: REPORT

The boys were crossing a bridge over the canal with two other teenagers and the dog on Monday afternoon when the animal either jumped or fell into the water, police told the Sacramento Bee.

Hourmouzus and Schneider rescued the dog and tried to pull themselves out of the fast-flowing water. They grabbed hold of the bridge, but an electric current running underneath it froze their grip to it. Another teenage boy jumped in and knocked them free, police said.

A CHP helicopter is stationed near where two teenage boys were electrocuted while trying to rescue a dog from an irrigation canal at an orchard in Dixon, Calif. (California Highway Patrol/Via AP)

A CHP helicopter is stationed near where two teenage boys were electrocuted while trying to rescue a dog from an irrigation canal at an orchard in Dixon, Calif. (California Highway Patrol/Via AP)

The route had no signs indicating that the bridge was electrified or that the water in the canal moved dangerously quick, Candy Carrillo, Hourmouzus' mother, told the Bee.

"They could have put up signs. They could have fixed the downed power lines or the short circuit they had. They could have prevented these kids from going down these roads," she told the paper.

Sheriff’s officials are investigating why electricity, which has since been shut off, was running through the bridge.

Counseling services were available to the teens’ classmates at Dixon High School, Principal Stephanie Marquez told FOX11 Los Angeles.

CLICK HERE TO GET THE FOX NEWS APP

"That's too soon for any young person to be taken off this Earth," Carrillo said of her son, a senior in high school due to graduate soon. "My son was an amazing person. He was kind, caring and lovable."

Dixon is located about 23 miles outside of Sacramento.

The Associated Press contributed to this report.