He took part in the operations off Derne, and was highly commended for his conduct. In the autumn of 1806 he returned home, and served at home stations until 1809, when he got his first command. This was a smart little schooner, the Revenge, of fourteen guns.
At that time the occurrences which led to the war of 1812-15 were taking place, and Perry soon had a chance to show his determination to maintain the dignity of the flag he flew. An American vessel had been run away with by the English captain who commanded her and who had hoisted British colors over her. Perry determined to take possession of her, although two small British cruisers lay near her. This he did, supported by three gunboats. The British cruisers, appreciating the justice of his conduct, did not interfere, although Perry had no means of knowing whether they would or not and took all the chances. As he was carrying the vessel off, he was met by a British sloop-of-war, and her captain sent a boat, with a request that Perry should come aboard. This Perry flatly refused, and, determined that his ship should not be caught unprepared as the Leopard caught the Chesapeake in 1807,[18] he sent his men to quarters, and made every preparation to resist; but the British ship passed on, and no collision occurred. In January, 1811, Perry had the misfortune to lose the Revenge by shipwreck off Watch Hill, in Rhode Island; but the court of inquiry which investigated it acquitted him of blame, and praised his conduct at the time of the accident.
When war was declared with Great Britain, Perry was in command of a division of gunboats at Newport; but finding there was little chance of seeing active service in that duty, he asked to be sent to the lakes, where Commodore Chauncey was preparing to dispute the possession of those great inland seas with the British.
In the spring of 1813 Perry arrived at Lake Erie, and entered upon his duties. The small fleet to oppose the British had to be constructed in the wilderness, on the shores of the lake; and men and material had to be transported at great labor and cost from the seaboard.
Perry showed the utmost skill, energy, and vigilance in his arduous work, and built and equipped his little squadron in a manner most creditable to himself and his subordinates.