By this time he had obtained his majority, and his next service was under Major-General Medows at St. Lucia in 1778–1779, after which his regiment served as marines in Rodney's fleet. Later in 1779 he was for a time a prisoner of war. Shortly before his promotion to lieutenant-colonel in his regiment (1780) he married Anne Carteret Dickson. After commanding the 5th in Ireland for some years, he exchanged and went with General Medows to Bombay, and served with that officer in India until 1792, taking part in various battles and engagements, notably Lord Cornwallis's attack on Seringapatam in the Third Anglo-Mysore War.