A great white shark has come terrifyingly close to making a meal of two Western Australian fishermen.

David Lock and his father were salmon fishing off the coast of Fremantle yesterday when they noticed the 5m predator swimming beside their 7m boat.

Mr Lock whipped out his phone and began filming as the shark zeroed in on a salmon which had been hooked by his father.

The shark lunged at towards the boat, knocking David Lock from his feet. (Supplied) (Supplied)

The shark circles the men's boat. (Supplied) (Supplied)

Seconds later, the shark lunged at the vessel, biting a large chunk out of the side of the hull.

The force of the impact knocked Mr Lock off his feet, causing him to drop the phone.

Still recording while lying on the deck, the phone captured the sound of the men scrambling to escape.

"Get out of here," Mr Lock screamed as his father started the boat's engine.

The shark is believed to be a great white of around 5m. (Supplied) (The shark is believed to be a great white of around 5m. (Supplied))