She threw her white handbag onto the elevated platform but struggled to lift herself over the ledge.

Luckily, a quick-thinking security guard and good Samaritan rushed to her aid just in time to pull her to safety as the train rolled into the station and barely missed her legs.

Not a moment to lose: the train barrels into the station in São Paulo, Brazil as two men help the woman back onto the platform. (Computergirls1985 via YouTube)

The woman heaved a cry of relief as she was helped to her feet and appeared unharmed. The frightening scene was captured by another commuter and the video was posted online on March 28.

In June 2012, MTA in New York City, which boasts one of the largest mass transit systems in the world, began an awareness campaign to encourage riders to be smart and "stay back from the platform edge."

The woman struggles to lift herself up onto the platform. (Computergirls1985 via YouTube)

It is a 4.5-foot drop from a subway platform to the tracks, and "venturing onto the subway tracks is the most dangerous thing a customer can do," said Cheryl Kennedy, the MTA's vice president of public safety, in a June 2012 statement.

"Notifying a police officer, the station agent or other MTA employee is the safe way to retrieve an item," the MTA said in a press release. "However, if riders heed the other car card which says not to stand close to the platform edge, it is a lot less likely that a cell phone will end up on the tracks in the first place."