WASHINGTON — The United States on Tuesday defended drone strikes targeting al-Qaida operatives and others it deems enemies, rejecting reports by two human-rights groups questioning the legality of strikes they asserted have killed or wounded scores of civilians in Yemen and Pakistan.

Human Rights Watch alleged that 82 people, at least 57 of them civilians, were killed by the unmanned aircraft and other aerial strikes in Yemen between September 2012 and June 2013 and called such strikes unlawful or indiscriminate. Amnesty International called on the U.S. to investigate reports in Pakistan of civilian casualties, among them a grandmother hit while farming with her grandchildren.

The New York-based Human Rights Watch said such strikes are unlawful or indiscriminate. Amnesty, based in London, said it is concerned that the attacks outlined in the report and others may have resulted in unlawful killings that constitute extrajudicial executions or war crimes.

President Obama’s chief spokesman, Jay Carney, said the U.S. “would strongly disagree” with any claims that the U.S. had acted improperly, arguing that American actions follow all applicable law.

Repeating Obama’s defense of the drone policy earlier in the year, Carney said there must be “near-certainty” of no civilian casualties before the U.S. proceeds with a drone strike. He said they’re not used when targets can instead be captured.

“U.S. counterterrorism operations are precise, they are lawful and they are effective,” he said.

Other methods of going after targets would result in even more civilian casualties “and ultimately empower those who thrive on violent conflict,” Carney said. He added that there’s a wide gap between U.S. assessment of drone-related civilian casualties and what some nongovernmental groups have determined.

Amnesty said the U.S. is so secretive about the drone program that there is no way to tell what steps it takes to prevent civilian casualties. It says the U.S. has “failed to commit to conduct investigations” into alleged deaths that have already occurred, and it called on the U.S. to comply with its obligations under international law by investigating the killings documented in the report and providing victims with “full reparation.”

In its report about strikes in Yemen, Human Rights Watch charged that each of six cases examined through interviews with Yemeni officials, witnesses and survivors, drone or other aerial strikes were carried out despite the presence of civilians, in contravention of the laws of war.

The strikes are part of a joint U.S.-Yemeni campaign against al-Qaida in the Arabian Peninsula, called the most dangerous al-Qaida branch. It’s blamed for a number of unsuccessful bomb plots aimed at Americans, including a failed plan to down a U.S.-bound airliner with explosive hidden in the bomber’s underwear and a second plot to send mail bombs on planes to the U.S. hidden in the toner cartridges of computer printers.

Pakistani officials regularly denounce the attacks in public, but senior members of the government and the military are known to have supported the strikes in the past.