Kirkpatrick Macmillan, a Scottish blacksmith, is credited with inventing the first bicycle in 1839-1840. His design included a drivetrain mechanism that allowed the rider to propel the bicycle without touching the ground, a key innovation from earlier running machines. However, bicycle invention history is complex, and some historians give precedence to Baron Karl von Drais's 1817 'running machine' (Draisine).