“We determined it was the right thing to do in defense of their own countries, but also to restore the rightful government there,’’ he told reporters. “Our conduct there is to try to keep the human cost of innocents being killed accidentally to an absolute minimum.’’

The American goal, Mr. Mattis said, is to encourage the combatants to negotiate a settlement to the conflict.

Tawakkol Karman, a Yemeni human rights activist who was awarded the Nobel Peace Prize in 2011, responded to Mr. Gargash, the Emirati foreign affairs minister on Twitter. She said the United Nations report would not be credible unless it cited the leaders of the United Arab Emirates and Saudi Arabia, as well as the head of the Houthi movement, as responsible for the civilian massacres.

Political factions and militias have been fighting for control of Yemen, the Arab world’s poorest country, since power-sharing talks collapsed in 2014 and the Houthis ousted the internationally backed government of President Abdu Rabbu Mansour Hadi.

Since then, fighting has devolved into proxy warfare, with Saudi Arabia and the United Arab Emirates arming and fighting alongside a disparate group of Islamist, tribal and regional militias against the Houthis, who control Sana, the capital, as well as the major port of Al Hudaydah and their ancestral territories along the Saudi border.

The Saudis and their allies have accused Iran of aiding the Houthis. Iran has denied involvement, despite evidence that the rebels are using Iranian weaponry, including missiles.

The report accused the Saudi-led coalition of routinely having failed to consult its own “no-strike list” of more than 30,000 sites in Yemen, including refugee camps and hospitals. It also said the Saudi Air Force had not cooperated with investigators about its targeting procedures.