I'd also like to add a point about humanitarianism. I believe that humanitarian intervention is only justified if it is requested by (the majority of) the people being helped or being affected.
Historically, there have been many examples of expansionism being justified by notions of paternalistic humanitarianism - that is, forcing a culture, religion, political system etc... onto a people "for their own good."
Great humanitarian acts IMO would be to stop forcing women in Saudi to cover up, give them equal rights, and allow them to drive. But what if the majority of the populace categorically believe it will rain fire and brimstone if they allow these to happen? Would an intervention be justified? (In reality, most Saudis actually do want more liberal laws).
What if it was a dictator targeting a small sector of the population and eliminating them, but the majority of that country's populace supports the elimination of those people?
Good question. Firstly I'll pretend the example is of a democratically elected government wanting to commit genocide on a minority - dictators are illegitimate representative of their nations regardless of popular support on some policies.
In either case, it means is that the people of that nation would think the genocide is the best option for them; doing something against this is therefore maleficent in their opinions. The disputed beneficence means you cannot claim the intervention is humanitarian to that nation (majority support is a litmus test for agreement on this).
You can however claim that it was humanitarian to that minority being saved, and perhaps the entirety of humanity - discounting the majority of that nation as loonies.
It is similar to doing something to a competent adult that they disagree with, and claiming it was for their best interests. It is just rather patronising. Though you can claim that it is for the better good of society.