He also became increasingly estranged from the East India Company's Board of Control (see Company rule in India). He resigned in 1821 but did not leave India until early 1823. He was appointed Governor of Malta in 1824 but died at sea off Naples two years later aboard HMS "Revenge", while attempting to return home with his wife. She returned his body to Malta, and following his earlier directions, cut off his right hand and preserved it, to be buried with her when she died. His body was then laid to rest in a large marble sarcophagus in Hastings Gardens, Valletta. His hand was eventually interred, clasped with hers, in the family vault at Loudoun Kirk.