A marathon swimmer was forced to abandon a record bid to swim from San Francisco's Golden Gate Bridge to the Farallon Islands after a great white shark had other ideas.

Simon Dominguez, 49, had nearly completed his goal of being the first person to swim from the bridge to the Islands, off the northern coast of California, when the shark showed up on the afternoon of July 29.

Four people have swum from the Farallon Islands to San Francisco, but Dominguez had to give up his dream of completing the swim in the opposite direction after the 12ft to 15ft great white began circling his support boat nearby.

Dominguez's daughter, who was on the boat, spotted the shark and warned her father, who by then had been in the water for around 18 hours and was more than 24 miles into his 28-mile swim.

"Apparently it was swimming around me and then it started moving straight toward me and that's when I thought it was probably a good idea to get out of the water," Dominguez told KPIX-TV.

"It was hard in that I really wanted to finish the swim, but a shark's a shark."

Dominguez, who is originally from Australia but now lives in the US, said he would need to check with his wife and daughter before he decided whether or not to make another attempt.

He added that his only plans at the moment were to "go straight to the pub, have a few beers and decide what the next steps are."

More about sharks