Who Invented the First Car Engine?

Nikolaus Otto is credited with building the first non-steam powered engine in 1876 based off a principal engineered by a man named Alphonse Beau de Rochas in 1862.