Shark attack
A signboard informing swimmers where they can swim in Destin, Florida, July 3, 2005. Getty Images

A teenage surfer in Western Australia was lucky to escape unscathed after he had a close encounter with a huge shark Sunday.

Matt Marshall was catching a wave in the waters off Prevelley when he came face-to-face with the 13-foot-long shark.

"Just saw a splash, thought it was a dolphin at first then yeah went back through the footage and realised it was a shark," Marshall told local media. "You just see the fin pull off the wave, about a meter in front of me ... so lucky it didn't come towards me a bit quicker."

Marshall's friend Kobi Evans, who recorded the the close call from the beach, said his friend was lucky to have escaped an attack.

"He's lucky he went for the wave essentially, because he could have been missing a leg for all we knew," Evans said.

Despite the close shave, Marshall said the incident won't stop him from entering the waters again.

The incident reportedly occurred just days after a surfing Belgian woman in her 20s, was knocked off her board by a 13-foot-long great white shark at nearby North Point beach. The woman's surfboard was damaged but she was unharmed.

Off-duty lifeguard Tom Van Beem told Stab Magazine he was in the water with the woman when the shark knocked her into the water.

"The water started doing that gurgling thing, like when it gets pulled over the reef, but we didn't think much of it," he told the publication. "Then out of nowhere I saw the girl get launched into the air, followed by a huge pair of fins and the whole side of this Great White."

The south-west corner of Western Australia is well known for shark sightings and attacks, some of which have been fatal.

In August 2010, 31-year-old Nick Edwards died after he was attacked by a shark while surfing at a beach off Gracetown. In 2013, a man named Chris Boyd was killed in the same area.

In April, 17-year-old Laeticia Brouwer was fatally wounded after a shark mauled her while she was surfing with her family at the popular Kelp Beds break, near Esperance.

Below are some tips as to how to survive a shark attack. According to an article on the Florida Museum of Natural History website, a shark attack can be avoided by observing certain rules.

1. Choose to swim in a group as sharks most often attack lone individuals.

2. Don't wander too far from the shore as it may be difficult to return fast for help in case you spot a shark.

3. Avoid the water at night, dawn, or dusk as sharks are most active at these times.

4. In case you have a cut or you are bleeding, do not enter the water.

5. Leave the water immediately if you spot a shark.

6. Avoid going into waters containing sewage as it attracts bait fishes, which in turn attract sharks.

7. Don't splash a lot in the water. Erratic movements can attract sharks.

8. Don't try to touch a shark if you see one.

9. If attacked by a shark, do whatever it takes to get away from it.