While the Spaniard first patented a steam-operated machine for use in mining, an Englishman is usually credited with inventing the first steam engine. In 1698, Thomas Savery, an engineer and inventor, patented a machine that could effectively draw water from flooded mines using steam pressure. Savery used principles set forth by Denis Papin, a French-born British physicist who invented the pressure cooker. Papin's ideas surrounding a cylinder and piston steam engine had not previously been used to build a working engine, but by 1705, Savery had turned Papin's ideas into a useful invention.