The U.S. on Monday pushed back against a majority on the U.N. Security Council as it vetoed a resolution on how to handle foreign militants who had fought for Islamic terror groups in Syria and Iraq.

A resolution before the Council, drafted by Indonesia, encouraged countries to prosecute, rehabilitate and re-integrate those who had fought for terrorist causes back into their societies.

UN SECURITY COUNCIL REJECTS MOVE TO 'SNAPBACK' IRAN SANCTIONS; TRUMP ADMINISTRATION PLEDGES TO KEEP GOING

But the U.S. vetoed the resolution as it did not call for terrorists to be repatriated to their home countries in the first place -- something the U.S. had demanded and that U.N. Ambassador Kelly Craft called a “crucial first step.”

“It is incomprehensible that other members of this Council were satisfied with a resolution that ignores the security implications of leaving foreign terrorist fighters to plot their escape from limited detention facilities and abandoning their family members to suffer in camps without recourse, opportunities, or hope,” she said in a statement.

Other countries have preferred that their nationals stand trial in the countries where their crimes were committed. But Craft described the resulting resolution as a “cynical and willfully oblivious farce.”

“Terrorist fighters and their families are easily ignored if they are someone else’s problem,” she said. “But I tell you now, and I say this with absolute conviction – failing to address head on the importance of repatriation will inevitably perpetuate the problem of terrorism.”

US FORMALLY MOVES TO RESTORE UN SANCTIONS ON IRAN, AS POMPEO PROMISES 'AMERICA WILL NOT APPEASE' 

The resolution passed 14-1 but then was shot down by the American veto -- the U.S. is one of five permanent members to be able to wield a veto on the Council.

The move marks the first U.S. veto on an issue not related to Israel and the Palestinians since 2002, and is just the latest example of the U.S. bucking consensus at Turtle Bay.

Last month, the U.S. triggered the “snapback” mechanism included in the U.N. resolution that enshrined the Iran nuclear deal -- a move that will re-impose all U.N. sanctions on Iran. But the move has been rejected by the Security Council’s president.

CLICK HERE TO GET THE FOX NEWS APP

“Having contacted the members and received letters from many member countries it is clear to me that there is one member which has a particular position on the issues, while there are significant numbers of members who have contesting views,” Indonesian ambassador Dian Triansyah Djani said.

The U.S. mission however, dismissed the move as not having any legal effect.

Fox News' Ben Evansky and The Associated Press contributed to this report.