here, we should also mention Poul and Karen Anderson's The King Of Ys.
First, The Lord Of The Rings and The King Of Ys have in common that each is a single long narrative usually published in more than one volume only for reasons of length. Thus, they are not really a trilogy and a tetralogy, respectively.
Secondly, both involve fantasy although to different extents. In Ys, the Gods remain off-stage although their effects are palpable.
Thirdly, each is an "end of an era" narrative: the Elves withdraw from Middle Earth; the Gods withdraw from Ys. In fact, many periods begin and end in Ys:
Mithras, the Olympians and the Ysan Three withdraw from the world of men;
transAtlantic colonization is contemplated though not yet implemented;
the Roman Empire withdraws from Britannia and Gaul;
the fabulous city of Ys is destroyed;
the modern city of Quimper is built;
The Lord Of The Rings leads to the Fourth Age of Middle Earth, the Age of Men, whereas The King Of Ys leads to the Dark Ages, the Middle Ages and the modern age - as if everything leads to us. However, Poul Anderson also looks into the future where some timelines culminate in post-human intelligences indistinguishable from gods.