The only free and comprehensive online etymological dictionary of the Spanish language
-mente Adverb-forming suffix akin to "-ly."

Originally Old Spanish -mientre, under contamination from -iter, but replaced by dialect variation -mente. From Latin mente "by the mind," from mens "mind." See mente for further etymology.

Romance: Western Vulgar Latin: Portuguese -mente, Galician -mente, Catalan -ment, French -ment, Italian -mente, Neopolitan -mente

The grammaticalization of mente into a suffix was an ancient process of referring to mental states by saying "with a ____ mind." For example, studiosa mente "with a studious mind" (Pharies 2008). It later crystalized as a suffix when speakers referred to any and every action with mente, thus generalizing its role and securing its place as a suffix (Dyer 1972). The addition of mente was largely a Vulgar Latin habit, in Classical Latin the traditional word was modo "way."

Ellision of the suffix is uneven across the Western Romance languages. In Spanish, the suffix is ellided until the final adverb (e.g. rápida y locamente), but in French the suffix is never ellided and in Catalan the first adverb takes the suffix while the subsequent are ellided (e.g. rápidament i silenciosa) (Castells 2013).