Eärnil II is a fictional character in J. R. R. Tolkien's Middle-earth Tolkien's legendarium. He does play a role in Tolkien's fantasy novel The Lord of the Rings, but his history is outlined in the appendices of the third volume, Return of the King.
He was born in the year 1883 of the Third Age. In 1945, he was elected as the thirty-second King of Gondor after his predecessor, King Ondoher, was slain in battle. In the previous year a two-pronged attack had been launched upon Gondor by the Haradrim and the Wainriders. In response, King Ondoher led the main army north to counter the Easterling invasion at Dagorlad and was defeated. Eärnil was commander of Gondor's southern army and guarded Pelargir.
Eärnil led his army to the Crossings of the Poros where he won an astounding victory over the Haradrim. This enabled him to turn his attention to the invading Wainriders. The Wainriders, certain of victory, were celebrating their success before they would enter Minas Anor. They were unaware of Eärnil's victory in the south and were taken by surprise when Eärnil suddenly attacked them. As a result, Eärnil won the Battle of the Camp.
After the threat was eliminated, Gondor's attention shifted towards the royal succession, overseen by Steward Pelendur and the Council of Gondor, for King Ondoher along with his two sons were slain at Dagorlad. Both Eärnil and Prince Arvedui of Arthedain (successor state of Arnor) claimed the throne. Arvedui based his claim on his direct descent from Isildur (second High King of Arnor and Gondor and uncle to Meneldil, the first King of Gondor after the joint rule of Isildur and Anárion), and as the husband of Fíriel, only surviving child of King Ondoher. Pelendur rebuffed him, claiming that "The crown and royalty of Gondor belongs solely to the heirs of Meneldil, son of Anárion, to whom Isildur relinquished this realm. In Gondor this heritage is reckoned through the sons only; and we have not heard that the law is otherwise in Arnor".