The Magazine of Fantasy & Science Fiction was first published in 1949 (under the title The Magazine of Fantasy no less). Does it mean that the fantasy was recognized as a distinct genre at the time already and that the word was used as the name of the genre? Or was it established later under the influence of such magazines? In short, what's the first recorded use of it as a genre?
Use of the term "fantasy" (spelled "phantasie" at the time) for individual works goes back at least to Elizabethan times. The OED cites 1542–3 Act 34–5 Hen. VIII, c. 1 Balades, plaies, rimes, songes, and other phantasies.
I don't know what criteria would be used to say that a grouping of such individual works becomes a "genre". A noteworthy example might be the collection "Essays and Phantasies" by James Thomson (1881). This one is even listed in the Science Fiction Encyclopedia, since (news to me!) some of Thomson's work can apparently be considered as steampunk.