There's three steps, that help you avoid this.
1. Play games you like, with people you like
This should apply to everyone at the table. You mention you knew the players didn't get along as people before you even started the campaign. Don't do that. You may like Player A, B, C, and D, but they may not like each other. If you really must play with all of them, run two different campaigns, or, have a subset play, then run your next campaign for the other group.
You pointed out that there was one player no one at the table liked - why were they there at all? You don't invite the guy you hate to your hangout with friends, why do it for a game?
2. Be clear on what kinds of disagreement among characters fits with this game
I wrote a tool for folks to use to set up expectations before a campaign - The Same Page Tool. Here's the relevant part:
Player characters are:
a) expected to work together; conflicts between them are mostly for
show
b) expected to work together; but major conflicts might erupt but
you’ll patch them up given some time
c) expected to work together; major conflicts might erupt and never
see reconciliation
d) pursuing their own agendas – they might work together, they might
work against each other
e) expected to work against each other, alliances are temporary at
best
If I'm playing a game where I expecet us to work on a team and you're playing a game where you expect characters to work at odds, it's going to seem like you, the player, are being a jerk, when your character starts backstabbing my character. So be clear on what levels of cooperation vs. conflict between characters are expected.
For games where you expect any conflict between characters at all, it may help to play a game with a social conflict mechanic - which gives players an option to force an issue that isn't killing each other's characters.
3. "Hold on, what's going on here?"
When people start acting weird, pause the game, ask the players what they are doing and why. Sometimes players are doing something that's just being misinterpreted ("Oh, no, I meant this as a set up to do this other thing next.") and sometimes they're just sliding into old habits ("Oh, you're right, I'm used to playing this other way, let me dial that back.") Those are the easy corrections.
The hard part is if a player is being fundamentally dishonest about what they're doing. For a game that people are playing for fun, the need to lie or be defensive (as a player, to other players, not the characters) is a key sign something weird and messed up is going on. And when you do not have honest communication, you also lack the ability to fix it.
Unfortunately, a lot of the advice in many roleplaying games, and the culture at large, has been to use dishonest communication, and for folks who have ingrained those habits, you can't really get them to unlearn it at the table if they're not willing. Those players you have to let go and move on to people who can be honest about what they want from the game and if that's the same thing the rest of the group wants.
When you do these three things, together, you quickly stop having player vs. player issues.