There are two basic approaches you can take, the friendly talk and the big stick. They are not necessarily exclusive.
The friendly talk
With this approach, you post something like the following to the main thread:
This argument is not constructive. All it's doing is making people upset (or frustrated as they try to ignore it) while making our forum look bad to the rest of the Internet. You've all made your arguments, and anybody who was going to be convinced has been. Continuing to argue about it won't change that. So let's knock it off, ok? This is a forum about (topic), not about wars between user camps. It's time to get back to (topic).
You are not trying to reach A or B with this, though if you happen to do so that's a nice bonus. This is a message for everybody else, both the followers of A and B and the silent majority of your users who want this to go away but don't want to speak up. Give them something to "+1" or "like" or vote on or say "me too" to.
The big stick
Does your forum have rules about what's on-topic, or is it an anything-goes forum?
If you have rules about what's on-topic, this almost certainly violates them and you need to shut it down. If you have any secondary place to have conversations, like an IRC channel or chat room associated with your forum, it will be easier to shut down the thread on your main site because you can divert it. Post a message on the thread saying this is not appropriate on the forum, link to where you want them to have the conversation instead, and freeze the thread. Once the main combatants have had a chance to see your notice, delete the thread.
If you don't have rules, this doesn't mean you have to stand by and let a fight ruin your site. You're a moderator and have, presumably, been invested with some authority and responsibility by the site owners and/or the community. It's your job to serve the whole community, which sometimes means exercising moderator fiat. This is one of those times. Do the stuff in the previous paragraph, and accompany that with something like the following:
I realize we do not have rules about this, an omission we may need to correct. But this is not serving the needs of the community and the moderators will not tolerate it. If you disagree with this action you can (whatever your channels for appeal are), but do not resume this conversation in this forum.
If you are able to communicate privately with individual users, consider sending a message to the primary people involved as well.