A California real estate agent is safe after escaping a kidnapping attempt by outsmarting a registered sex offender, who lured her to a house under false pretenses and held her at gunpoint.

The victim, an Elk Grove, California-based real estate agent whose name was not provided by local authorities, was lured to a home and held against her will by David Burnhart, who authorities later confirmed is a registered sex offender.

According to Elk Grove police, Burnhart contacted the agent at her office and requested a showing at a model home in a new development. When Burnhart arrived at the home, he brandished a handgun, threatened the victim and held her against her will.

Burnhart allegedly took the victim into a bedroom and handcuffed her. He later moved her into a second location inside the residence. According to police, Burnhart was continually threatening her throughout the encounter.

While Burnhart and the victim were inside the model home, one of the development’s security officers arrived and could be seen outside the property. Burnhart removed the handcuffs, threatened the victim again and ordered her to walk to the front door.

After Burnhart exited the home in front of the victim, the victim closed the door and locked herself behind him. Burnhart was unable to get back into the home and drove away in a red pickup truck.

The victim then flagged down the security officer and relayed the details of her abduction. According to police, the security officer, fearing for his safety and the safety of the victim, drove to a nearby shopping area and contacted local police.

During the course of the resulting investigation, officers determined that two cell phones and personal property belonging to the victim were taken from inside her vehicle, which was parked nearby, at some point during or after the attack.

Investigators were able to determine that Burnhart was the alleged perpetrator and served an arrest warrant on the 47-year-old male at his residence in Lodi, California.

Burnhart was not at the Lodi residence, but officers were able to determine that he was at a different residence in Modesto. Officers subsequently arrested Burnhart at the Modesto residence, finding a loaded handgun in a vehicle associated with Burnhart.

Burnhart was charged with robbery, burglary, making terrorist threats, illegal possession of a firearm, false imprisonment, and kidnapping to commit robbery.

The attack brings the issue of real estate agent safety to the forefront again, just months after the tragic abduction and murder of Arkansas Realtor Beverly Carter.

Carter was also lured to a home for a showing by a client she’d never met before. Carter’s husband became concerned when he hadn’t heard from his wife by 9 p.m.

He drove to the home and found her car still parked in the driveway with her purse still inside the car.

A search for Carter began in earnest. CBS11 in Arkansas reported that her husband received three mysterious texts from her phone at about 1 a.m. Sept. 26, just six hours after she disappeared, that didn't sound like her at all.

"All of a sudden I received three texts in a row. One said 'Yes.'… Then she sent another text that said, 'My phone's low. The battery's down, and I'll call you whenever I get signal.' …And, then, straight back-to-back, I received a text that said 'Oh, I'm out drinking with some friends,'" he recited. "Beverly's not a drinker…We just want our mom back, and my wife of 35 years…I need her."

Tragically, Carter’s body was found in a shallow grave a few days later. Two people, Arron Michael Lewis and Crystal Hope Lowery, were arrested in connection with Carter’s death.

In the wake of Carter’s death, hundreds of real estate professionals signed a pledge to change how they operate in an effort to ensure their safety.

The pledge reads:

I pledge to...

Under no circumstances show a home to a stranger without first meeting them at the office or asking them to submit identification

Educate my clients that open houses are a safety concern both for the home owner and myself.

Limit open houses as a marketing strategy and/or make prudent and safe decisions about my open house marketing efforts

Follow my intuition, and not step into situations that I feel uneasy about

Use the buddy system whenever I am unsure or uneasy about a showing or meeting

Make myself available to my fellow agents as a "showing-buddy" should they ever feel the need to take someone along or feel unsafe

Seriously consider the nature of my personal marketing, and its potential impact on my safety