A man's attempt at a risky selfie above the swollen Potomac River nearly turned deadly Sunday, when he slipped into the raging waters and had to be rescued by bystanders.

The Montgomery County Fire and Rescue Service told FOX5 the incident happened after 5:30 p.m., when the man was taking a selfie on the Maryland side of the river near the Great Falls.

"Some passersby had intervened and slowed this person down," Montgomery County Fire spokesman Pete Piringer told FOX5. "We believe that he was hanging on to some obstacles in the water. The water was very high."

Recent rains have left the Potomac River above flood stage and led to the closure of several popular nature trails. (FOX5)

The man was spotted by onlookers, who then pulled him out of the water. Video taken by a bystander shows the efforts to drag the man out of the raging waters.

Firefighters arriving at the scene were able to treat the man for his injuries. The man, who was not identified, had "serious" injuries but was expected to survive and taken to a hospital, Piringer said.

CALIFORNIA WOMAN HIKING IN MICHIGAN FALLS TO DEATH WHILE TAKING SELFIE: OFFICIALS

Recent rains have left the Potomac above flood stage and led to the closure of several popular nature trails.

People recently visiting the falls have told FOX5 the river has been much higher than in recent memory.