A scuba diver has shot amazing and rare footage of a spider crab moulting from its shell only to be devoured by a huge stingray in Melbourne.

The giant spider crab is seen pushing itself out of its old shell while other bottom-feeders patrol around, including a starfish. Three huge stingrays then swim in to prey on the crustacean.

PT Hirschfield , a scuba diver and film-maker from Melbourne, was initially at Blairgowrie Pier to record the moulting process after putting it on her bucket list following a terminal cancer diagnosis.

Australian scuba diver and filmmaker PT Hirschfield is swimming against terminal endometrial cancer one scuba dive at a time. (Supplied)

“In all those years of spidey diving, this was the first time I had finally spotted one in the process of moulting its old shell,” Ms Hirschfield said.

That was until the stingrays crashed the party.

A spider crab moulting from its shell inMelbourne's Blairgowrie Pier. (Supplied)

“Three huge smooth rays circled in on the ocean floor beneath the pier, waiting for a large soft-shelled crab to emerge,” Ms Hirschfield said.

“As I was filming the spider crab moulting, the huge one shoved its nose against me, instructing me to get out of its way. I pushed the stingray gently back and again it pressed its nose against my arm.”

A huge smooth sting ray devours a spider crab moulting. (Supplied)

The brave diver refused to budge, despite the huge ray’s nudges, and continued to film it as it swam over the spider crab and slurped up the newly soft-shelled crab.

“As someone who has been diagnosed with terminal cancer, this year is all about ticking things off my Bucket List. I finally crossed ‘film a spider crab moulting’ off my Bucket List,” Ms Hirschfield said.

A spider crab dancing shot by Australia scuba diver PT Hirschfield. (Supplied)

“Sadly, it didn’t work out so well for the poor crab.”