The genocide ended later that same year when the predominantly Tutsi RPF , operating out of Uganda and northern Rwanda , defeated the national army and Hutu militias , and established an RPF-led government of national unity .