CAPE TOWN, South Africa — A British man lost parts of both legs when he was attacked by a great white shark Wednesday after he ignored warnings and went swimming at a Cape Town, South Africa, beach, authorities said.

The 42-year-old man apparently made it back toward shore at Fish Hoek beach and was pulled from the water by a bystander who left before he could be identified, according to the Press Association news agency.

An amateur video taken shortly after the attack was uploaded to YouTube and shows a shark still lurking in the water after the mauling victim was stabilized on the beach and airlifted to Constantiaberg Medi-Clinic in critical condition.

National Sea Rescue Institute (NSRI) spokesman Craig Lambinon told The Telegraph of London that the man was swimming about 50 meters from shore when the shark attacked.

"It repeatedly bit at both of his legs and caused serious wounds on both the right and left side," he said.

When medical teams arrived, the found the swimmer with his right leg bit off above the knee and the left leg bit off below the knee," Lambinon said.