A canine castaway lost at sea has been reunited with her owners after spending more than four months living off goats on a Queensland island.

Owner Jan Griffith said her family were devastated when their cattle dog, Sophie Tucker, fell off the side of their boat in choppy waters off the Mackay coast in north Queensland in late November.

Sophie ... learned to live wild after swimming to island.

But unbeknown to them, their hardy hound swam five nautical miles to St Bees Island, where she survived until last week by hunting baby goats.

She was last week returned to her family after rangers captured what they believed was a wild dog.