Russia and China have vetoed a UN Security Council resolution that would have referred the conflict in Syria to the International Criminal Court (ICC).
More than 60 countries supported the French-drafted text calling for an investigation into alleged war crimes being committed by both sides.
France's permanent representative said a veto "would cover up all crimes".
But Russia's called it a "publicity stunt" that would hurt efforts to find a political solution to the crisis.
It is the fourth time Russia and China have blocked Western resolutions relating to the situation in Syria, where an estimated 160,000 people have been killed and 9.5 million others driven from the homes since 2011.
The 13 other members of the Security Council voted on Thursday in favour of the draft resolution, which condemned the "widespread violation" of human rights and international humanitarian law by Syrian government forces, as well as abuses by "non-state armed groups".
It called for an ICC investigation, drawing on evidence collected by the UN Human Rights Council's Independent International Commission of Inquiry.
France put forward the draft after the collapse of the UN-sponsored peace talks in Geneva in January and February, and amid growing horror at atrocities committed by both sides, reports the BBC's Barbara Plett Usher in New York.
Before the vote, French permanent representative Gerard Araud said shared moral values had to overcome longstanding divisions over Syria on the Security Council.
"A veto would cover up all crimes. It would be vetoing justice," he warned.
The UN's Deputy Secretary-General, Jan Eliasson, meanwhile urged Security Council members to "put an end to this long nightmare".
But Russian permanent representative Vitaly Churkin told reporters as he walked into the meeting: "I'm going to be boringly predictable."
The Syrian government had called the resolution "biased" and an effort to "sabotage any chance of peaceful settlement of the Syrian crisis led by the Syrian people themselves".
China had publicly remained silent in the lead-up to the vote.
The Syrian opposition National Coalition called the vetoes a "disgrace".
US envoy Samantha Power said that because of Russia and China's decision "to back the Syrian regime no matter what it does, the Syrian people will not see justice".
"There should be accountability for those members of the council who prevented accountability," she added, before reading out the testimony of alleged Syrian war crimes victims.
Rwanda's Eugene Richard Gasana said: "This council cannot be inured to mass tragedies."
Syria is not a party to the Rome Statute, the treaty establishing the ICC. Unless the government ratifies the treaty or accepts the jurisdiction of the court through a declaration, the ICC can only obtain jurisdiction if the Security Council refers the situation there to the court.
The Security Council has previously referred conflicts in Darfur and Libya to the court, but not with so many countries signing on in support.