WASHINGTON (Reuters) - A U.S. federal appeals court on Friday threw out a lawsuit by the families of two Yemeni men allegedly killed as innocent bystanders in a U.S. drone strike in 2012.

The unanimous ruling by a three-judge panel of the U.S. Court of Appeals for the District of Columbia Circuit in Washington upheld a lower court’s finding that it lacked the authority to question decision-making by the government over the missile strike.

The case began in 2015 when the families of Salem bin Ali Jaber, an imam, and Waleed bin Ali Jaber, a police officer, filed a “wrongful death” suit against the U.S. government, then President Barack Obama and other U.S. officials.

They claimed the deaths were collateral damage in an August, 2012 Hellfire missile attack by a U.S. drone in the eastern Yemeni village of Khashamir targeting three extremists, court papers said.

Salem had recently preached against al Qaeda and brought Waleed, his nephew, along for protection to a meeting requested by the other three, the papers said. All five men were killed in the strike.

The families sought a court declaration that the strike violated international and U.S. law. The lawsuit did not seek monetary relief.

The United States has been conducting counterterrorism operations in Yemen for years against militant groups like al Qaeda. In 2013, Obama set tighter rules on drone strikes and promised greater transparency.

Monday’s ruling tossing the suit said that, based on legal precedent, judges cannot second-guess the government’s military judgment. It is “the Executive, and not a panel of the D.C. Circuit, who commands our armed forces and determines our nation’s foreign policy,” the ruling said.

Circuit Judge Janice Rogers Brown, who wrote the decision, also issued a rare separate opinion calling for greater oversight over the drone program.

She said the legal doctrine preventing courts from reviewing the decision-making by the president and Congress in foreign policy or national security matters may be “deeply flawed” because it blocks any court supervision of the use of sophisticated new military technologies like drones.

“Of course, this begs the question: if judges will not check this outsized power, then who will?” said Brown, who was appointed to the appeals court bench by Republican former President George W. Bush. She called congressional oversight “a joke -- and a bad one at that.”

The other two judges on the panel, both appointed by Obama, did not join her separate opinion.