1.Ka5! (threatens 2.Kb6, 2.Ne7+ and 2.Nd4+)
1...e1Q+ 2.Kb6! and Black is powerless to stop both 3.Nc7# and 3.Nc6~ with a discovered mate.
1...Kb7 2.Ne7+ Ka7 3.Nc8#
1.Kb5? Rg8! [Now possible, because White can't play Nd4+ and Nb5#] 2.Kb6 Rc8! and White has no mate.
I'm not crazy about the multiple White threats, but the key, allowing Black to Queen with check, is good.