Middleton Beach in Albany on Western Australia's south coast was closed on Saturday after swimmers spotted a shark between 1.5 and 2 metres long inside a safety net.

Police arrived shortly before 9:00am and ordered swimmers out of the water.

Stand-up paddleboarder Paul Hepworth said beachgoers were taken by surprise.

"No-one could really believe it, that there was a shark inside. People were in disbelief," he said.

Albany's Middleton Beach remains closed. ( ABC News )

Another local resident said police were trying to get about a dozen people out of the water when he arrived at the beach.

Authorities chased the shark out of the Middleton Beach enclosure with a jet ski, and divers were not able to find any initial faults with the net.

Albany Mayor Dennis Wellington said the net was popular, but its effectiveness would now need to be reviewed.

"It's just coming up to the end of its three-year trial period, which then the city will get a report and have an evaluation of it and obviously this will form a very big part of it," he said.

The beach remained closed overnight.