A man has died after being attacked by a shark off the coast of Western Australia, in what authorities said was the second fatal shark attack recorded in the country this year.

The attack happened shortly before 10am local time on Saturday off Rottnest Island, a popular destination west of the city of Perth. Emergency services were called, but the man could not be saved.

The state’s Department of Primary Industries and Regional Development said the shark was a great white estimated at about four metres, or 13 feet, in length. Beaches in the area were closed while authorities responded.

Western Australia’s waters are home to large populations of great white sharks, and the state has recorded a number of fatal encounters over the past two decades. Authorities monitor the coastline with patrols, drones and tagging programmes.

Fatal shark attacks remain rare relative to the number of people who swim, surf and dive along Australia’s coast each year, but they draw intense public attention and periodic debate over mitigation measures.

Officials urged beachgoers to heed closures and warnings while the response continued. The identity of the man was not immediately released.