Who first said there was a link between Protestantism and capitalism?

Max Weber suggested in 1904 that certain tenets of Protestantism were more favorable to commerce and thus led to the rise of capitalism in his book The Protestant Ethic and the Spirit of Capitalism.

Karl Marx earlier suggested the reverse connection; that the rise of commerce and capitalism in Europe led to the Protestant Reformation. That would have been in the second half of the 19th century (1870 -ish).