A surfer whose leg was bitten off by a shark last week in waters off western Australia has died at a hospital from his injuries.

The brother of 29-year-old Ben Gerring thanked the "heroes" who brought him to shore after the attack and the medical staff at Royal Perth Hospital, where he died late Friday night.

Rick Gerring said the hospital staff had given them three days with their loved one. "Obviously we were always hoping for the best outcome, it was always at the back of our minds that this could happen, but they gave us that time to say our goodbyes," he told ABC News.

Ben Gerring was attacked Tuesday afternoon while paddling his surfboard at Falcon Beach in his hometown of Mandurah, south of Perth. Fellow surfers paddled to him to bring him to shore, witnesses said.

An inspection of his damaged surfboard showed a white shark was responsible. The Fisheries Department trapped and killed a large shark on Wednesday afternoon but don't know if it was the same shark that attacked Gerring.

Area beaches have reopened, but the department warned people to be extra cautious in the water.