Who has the highest legal priority to lead the Janazah prayer over the deceased?

Funeral Rites Part 2: Funeral Prayer, Carrying, and Burial