In July 1778, Lt. Col. O'Hara arrived in America and immediately commanded forces at
Sandy Hook, New Jersey. Lt. Gen.
Henry Clinton, commander of the British army in America, gave him that assignment as the French fleet under
Admiral d'Estaing threatened New York City. In October 1780, O'Hara was promoted to
brigadier and became commander of Brigade of Guards. He became Lieutenant General
Charles Cornwallis' second-in-command and good friend. During Cornwallis' pursuit of
Major general Nathanael Greene to the
Dan River, O'Hara distinguished himself at Cowan's Ford,
North Carolina on 1 February 1781. He also led the British counterattack at the
Battle of Guilford Courthouse on 15 March 1781, which led to General Greene withdrawing from the field of battle. He was severely wounded during this battle, but was able to remain with the army as it moved toward Yorktown, Virginia. His nephew, who was a lieutenant of the artillery, was killed during the battle. General O'Hara represented the British at the
surrender of Yorktown on 19 October 1781, as Cornwallis' adjutant, when the latter pleaded illness. He first attempted to surrender to French
Comte de Rochambeau, who declined his sword and deferred to General
George Washington. Washington declined and deferred to Major General
Benjamin Lincoln, who was serving as Washington's second-in-command and had surrendered to General Clinton at
Charleston in May 1780. O'Hara is depicted in the painting
The Surrender of Lord Cornwallis by John Trumbull. O'Hara was exchanged on 9 February 1782, and was sent to the Caribbean in command of a detachment of reinforcements. Following the conclusion of the war with the
Treaty of Paris he returned to Britain having been promoted to major general. In 1784, O'Hara fled from England to
the Continent due to gambling debts. While in Italy he met the writer
Mary Berry and began a long relationship with her. After Cornwallis offered him help in paying off his debts, he was able to return to Britain. When Cornwallis was made
Governor General of India in 1786 he offered to take O'Hara with him, but he declined. In 1792, he was appointed lieutenant governor of
Gibraltar at the rank of Lt. General. ==Toulon==