A woman from the Sacramento area in California went to great lengths to capture the perfect selfie - and she almost lost her life in the process.

The young woman was trying to pose for a selfie photo with a group of friends on the Foresthill Bridge in Placer County, Calif. on Tuesday when she lost her footing and fell approximately 60 feet (18 metres) below.

The bridge is 730 feet tall, the highest one in the state, and one of the highest in the United States.

In a Facebook post, the Placer County Sheriff’s Office said the unidentified woman and her friends were walking on the girders (or beams) underneath the bridge when “she attempted to take a selfie” and fell from the bridge and landed on the trail below.

She was airlifted to Sutter Roseville Medical Center and is expected to survive, according to the police.

“This young lady is very lucky to be alive and the consequences could have been worse for her, her friends and her family,” the post read.

One of the woman’s friends who was with her on the bridge, Paul Goncharuk, told CNN affiliate KOVR that she was knocked unconscious by the fall and suffered a deep gash to her arm. He also said she fractured some bones that will require her to undergo surgery.

The Sheriff’s Office said the woman was trespassing on the walkways below the bridge, which are closed to the public for safety reasons.

The girders have become a popular place for risk-takers looking to take daring photographs to upload to social media.

“It's a cool place to take pictures, but obviously not worth the risk," Goncharuk said.

Police have started patrolling the area after photos and videos of intruders posing beneath the Foresthill Bridge have emerged on social media.

“You will be cited and or arrested if found in any closed location. Worse yet, you can lose your life and none of that is worth a selfie!” the Sheriff’s Office warned. “Enjoy the bridge and canyon from the designated areas.”