Two wrongs make a right

Consider that two wrongs never make a right, / but that three lefts do. Two wrongs is probably not going to be enough. Two wrongs make a right is a logical fallacy that occurs when wrongs committed by one party are used to excuse wrongs committed by a second party. If it is asserted that the action is justified, because the other party did the same action, then the fallacy is tu quoque.

The fallacy is essentially a red herring fallacy and an informal fallacy.

Examples
The fallacy is commonly used to justify actions, perhaps most noticeably in conflicts between countries and ethnic groups. Palestinians and Jews alike can point to perceived injustices committed by the other side, in some cases stretching into the distant past. This same pattern can be seen in arguments over the Crusades in which Muslims and Christians attempt to attribute blame by citing slights committed by the other side.

America and China execute people, so why can't we?
In 2010 BBC News published a news story relating personal experiences with the sharia police of Aceh, Indonesia. Burhanuddin, one of those responsible for passing the law, offered two arguments to justify the stoning to death of adulterers:


 * 1) "Sharia law acts as a deterrent in Aceh. We need it."
 * 2) "China has a death penalty, so does America. They even detain people without trial there. Why do people only point the finger at Aceh?"

The first argument may be valid if there is a demonstrable benefit from the institution of the law, but assuming that the death penalty is wrong, the second is an example of the two wrongs make a right fallacy. Furthermore, the respondent makes a false equivalence as the question was about stoning people to death for infidelity, a rather worse form of capital punishment than those used by China or the U.S. and neither of these countries impose the death penalty for infidelity at all. It also ignores the fact that plenty of opponents of capital punishment actually do criticize the U.S. (as the only Western country that still executes people) and China (for its sheer volume of executions), so the claim that "people only point the finger at Aceh" is simply wrong. Indeed, to most opponents of capital punishment, Indonesia and Aceh are not at all an issue of concern.

America illegally invaded other countries, so why can't Russia?
In 2014, after the Russian annexation of Crimea, some left-wing circles — notably The Nation and the Stop the War Coalition — went to bat defending Vladimir Putin's actions along the lines of "Hey NATO, you have no right to criticize what he's doing, look at what you did in Iraq!"

While the appeal to hypocrisy could be applied to various hawkish politicians (see John McCain), it's still a deflection from the fact that a war under a false (even imperialist) motive doesn't justify another one, this time by an opposing power. The argument started to peter out after the MH17 disaster.

America hurt people, so why can't we?
The operation cost just under $500, and no one was killed, or even hurt. In that same time the Pentagon spent tens of millions of dollars and dropped tens of thousands of pounds of explosives on Vietnam, killing or wounding thousands of human beings, causing hundreds of millions of dollars of damage. Because nothing justified their actions in our calculus, nothing could contradict the merit of ours.

Non-fallacious use
A comparison to another person or situation is not necessarily a fallacy. Human rights disputes are prone to comparison, since they tend to be based on one group asking for the same rights afforded to another group. The U.S. civil rights movement of the 1960s were able to draw fair comparisons when noting that whites had significantly greater access to government amenities, such as education.

A comparison is valid so long as the request or action can itself be justified without relying exclusively on a comparison. If asking for rights that are afforded to another group, one has to explain why anyone should have those rights in the first place. In the example of civil rights protesters asking for access to education, they would be guilty of a fallacy only if they could offer no good reason why anyone should have similar access.