Johann Maelzel (1772-1838) was a mechanical engineer who bought the automaton called the Turk from Wolfgang von Kempelen's son. He was the inventor of the metronome in 1816 and was a good friend of Beethoven. Prince Eugene de Beauharnais bought the Turk from Maelzel in 1811 for 30,000 francs and Maelzel gave part of the money to Beethoven. In 1817 he bought the Turk back from the Prince for the same sum. No cash was handed over to the Prince, but Maelzel was to pay from any profit he might make. The Prince died but his heirs sued Maelzel for the balance. Maelzel fled to America with the Turk to escape the debts and lawsuits. Maelzel was buried at sea in 1838 after dying on a ship bound from Cuba to America.