Unferth, a “thane” or retainer in the court of King Hrothgar, serves as a foil to Beowulf in the poem. The contrast in their personalities is underscored in a scene in which Unferth mocks Beowulf for losing a swimming contest in his youth:
UNFERTH spake, the son of Ecglaf,
who sat at the feet of the Scyldings' lord,
unbound the battle-runes. —Beowulf's quest,
sturdy seafarer's, sorely galled him;
ever he envied that other men
should more achieve in middle-earth
of fame under heaven than he himself.
"Art thou that Beowulf, Breca's rival,
who emulous swam on the open sea,
when for pride the pair of you proved the floods,
and wantonly dared in waters deep
to risk your lives? Winter's storm
rolled the rough waves. In realm of sea
a sennight strove ye. In swimming he topped thee [...]"
Unferth, the narrator notes, is highly jealous of Beowulf, as he “envied that other men” have accomplished greater things than he. As a result of his envy, which “sorely galled him,” Unferth mocks Beowulf publicly, accusing him of recklessness. Beowulf, he claims, once competed with his friend Breca in a swimming contest out of “pride.” Further, Unferth accuses Beowulf of losing the contest, implying that he does not believe that Beowulf is a great hero who could defeat Grendel. Beowulf later retorts that, during his contest with Breca, he defeated several sea-monsters that had been attacking sailors, and even accuses Unferth of murdering his own brother.
Unferth and Beowulf have very different personalities. Both men are somewhat prideful, and their argument reflects a shared interest in the public's opinion of them. But where Unferth uses words to attack his opponents, Beowulf is primarily a man of action. Because none of the Danes, including Unferth, have been able to defeat Grendel, Beowulf has traveled to their lands in order to dispatch the monster and prove his worth. Though these two figures serve as foils to each other in the poem, they later reconcile and exchange swords.