Lifeguards have closed Mt Maunganui beach after a surfer's close encounter with a shark.

The surfer raised the alarm with lifeguards after a shark swam at him at about 2:30pm.

Bay of Plenty surf lifesaving spokesman Mike Lord says the beach will be closed until lifeguards are confident the shark is not going to attack any swimmers.

"There's quite a few sharks around the coastline but they don't normally come this close to the surfers.

"He got quite a scare."

Mr Lord did not know what size or breed of shark the surfer spotted.