I don't know about Twain, but a similar sentiment plays an important
part in the argument for Union in the Federalist Papers. Commenting on
the almost inevitable propensity of bordering nations to become hostile
to one another, Hamilton writes "that it has from long observation of
the progress of society become a sort of axiom in politics, that
vicinity, or nearness of situation, constitutes nations natural enemies"
(end of Federalist #6; more generally, see numbers 5-8. As for the
question of minorities, the authors of the Federalist certainly don't
expect that majorities will be nice to minorities; but they do try to
arrange things so that it is as difficult as possible for the majority
to oppress the minority (see especially, Federalist 10).