On September 10, 1813, Perry's command fought a successful fleet action against a squadron of the Royal Navy in the Battle of Lake Erie. It was at the outset of this battle that Perry famously said, "If a victory is to be gained, I will gain it." Initially, the exchange of gunfire favored the British. Perry's flagship, USS Lawrence, was so severely disabled in the encounter that the British commander, Robert Heriot Barclay, thought that Perry would surrender it, and sent a small boat to request that the American vessel pull down its flag. Faithful to the words of his battle flag, "DON'T GIVE UP THE SHIP" (a paraphrase of the dying words of Captain James Lawrence, the ship's namesake and Perry's friend), Perry, with Lawrence's chaplain and purser as the remaining able crew, personally fired the final salvo, and then had his men row him a half-mile (0.8 km) through heavy gunfire to transfer his command to USS Niagara. Once aboard, Perry dispatched Niagara's commander, Captain Jesse Elliott, to bring the other schooners into closer action while he steered Niagara toward the damaged British ships. Like Nelson's Victory at Trafalgar, Niagara broke the opposing line. Perry's force pounded Barclay's ships until they could offer no effective resistance and surrendered. Although he had won the battle aboard Niagara, he received the British surrender on the deck of the recaptured Lawrence to allow the British to see the terrible price his men had paid. Perry's battle report to General William Henry Harrison was famously brief: "We have met the enemy and they are ours; two ships, two brigs, one schooner and one sloop."
"Don't give up the ship", a phrase repeated by Captain James Lawrence during his dying days after being wounded by enemy fire aboard the Chesapeake on June 1, 1813, became the battle cry of Oliver Hazard Perry. Perry learned of Lawrence's demise upon arrival at Presque Isle and commanded that Lawrence would be honored with the name of a brig, which would simply be called Lawrence. A battle flag would also be needed, and the words of Perry's good friend Lawrence would be just the battle cry suited for the coming days. A woman named Margaret Forster Steuart, resident of Erie Pennsylvania, wife of Army Captain Thomas Steuart and sister to Thomas Forster, both friends of Perry's, Forster being commander of the Erie Light Infantry that had guarded the fleet, was enlisted to make the battle flag. With the help of her two daughters, three nieces, and a cousin, she had the flag ready for Perry within just a few days. As of July 2009, Perry's flag, Steuart's work, and Lawrence's dying words can still be seen today, as the flag has been placed on display at Bancroft Hall.
In recognition of his victory at Lake Erie, in 1813 Perry was elected as an honorary member of the New York Society of the Cincinnati.
Although Perry is often referred to as "Commodore Perry," it should be kept in mind that, prior to the American Civil War, commodore was not a rank in the U.S. Navy but, rather, the title of an officer in command of a squadron of two or more ships. Perry first held the title of commodore when he took command of the Lake Erie squadron in 1813.