A shark attacked and killed a 16-year-old boy Tuesday while he and a friend were bodyboarding off Australia's eastern coast, officials said.

Peter Edmonds was about 50 yards from shore when the shark attacked around 8 a.m., lifeguard spokesman Stephen Leahy said.

Edmonds suffered two large bites, one to the leg and one to the body. He died of extreme blood loss while lifeguards and paramedics tried to save him.

It was the first fatal shark attack in Australia in two years.

All nearby beaches were closed as a precaution, and crews were looking for the shark in the waters off Ballina, about 400 miles north of Sydney, Leahy said.

Edmonds' bodyboarding friend, Brock Mathew, was leaving the water when he looked back and saw Edmonds "in a bit of trouble" and swam back to his friend, who he thought was trying to catch a wave.

Mathew said he saw a "big, gray shadow" pass by him as he paddled to his friend, who was by then face down in the water.

"I thought he was only joking, so I went over to him and as I flipped him over I saw his leg," said Mathew, who dragged his friend to shore and tried with lifeguards to resuscitate him.

"He didn't make one noise," Mathew said.

Edmonds' 20-year-old sister, Kylie, said her parents were numb from the sudden loss.

"They lost their baby — what more can you say? The only boy in the family," she said.

Leahy said there had been three shark alarms sounded in Ballina in recent months.

Heavy rainfall over the past two days had made the area more susceptible to attacks, because sharks congregate near river mouths to feed in rainy weather. The beach where the attack occurred is just north of the Richmond River estuary.

It wasn't known what type of shark attacked the teenager, though residents said bull sharks had been spotted in recent days.

Detective Inspector Steve Clark said Mathew would be considered for a bravery medal for going back into the water to rescue his friend despite seeing the shark nearby.

There about 15 shark attacks a year in Australian waters — one of the highest rates in the world — but on average just over one attack per year is fatal.

In January, a fisherman survived a bite by a shark he had reeled onto his boat deck. In December, a surfer was attacked by a shark at a beach north of Sydney, but his injuries were not life-threatening.