Flinders hoped to return to England on the HMS Porpoise to procure another vessel to finish his surveying work, but the Porpoise struck Wreck Reefs, part of the Great Barrier Reef, and sank approximately 700 miles (1,100 km) north of Sydney.
Flinders expertly sailed her cutter 1130 kilometres back to Sydney, then arranged for the rescue of his wrecked shipmates, and subsequently sailed for England in another leaky boat, the 29 ton HMS Cumberland.
However, the poor condition of this vessel forced him to put in at French-controlled Isle de France (now known as Mauritius) for repairs on 17 December 1803. By this time war between Great Britain and France had broken out again, but Flinders hoped that his French passport (despite its being issued for the Investigator and not the Cumberland) and the scientific nature of his mission would allow him to continue on his way.
General Decaen, governor of Mauritius, was a faithful and honest servant of Emperor Napoleon, but his attitude to Flinders was overbearing, despite the obvious cause of his enforced arrival. Decaen suspected that Flinders was a spy. Flinders also managed to insult Decaen by not taking off his hat in his presence or accepting a dinner invitation from his wife. Flinders was arrested as a spy and incarcerated for 6 years on the island, although for much of that time he was afforded freedom of the island.
Decaen referred the matter to the French government but this took time due to the general confusion of the war. Eventually, on 11 March 1806, Napoleon gave his approval for his release, however Decaen still refused to allow Flinders to leave. By this stage he believed Flinders' knowledge of the island's defences would have encouraged Britain to attempt to capture it.
Nevertheless, in June 1809 the Royal Navy began a blockade of the island, and in June 1810 Flinders was freed. Travelling via the Cape of Good Hope on Olympia, which was taking despatches back to Britain, he received a promotion to post-Captain, before continuing to England in May 1810, albeit now in deteriorating poor health.