As President Obama left a summit with African leaders at the State Department late Wednesday afternoon, an extra passenger jumped in his limousine for the ride back to the White House. Gen. Martin Dempsey, chairman of the Joint Chiefs of Staff, had urgent new information about Iraq.

Thirty-six hours later, American warplanes dropped bombs over Iraq for the first time since Obama, in December 2011, announced the end of what he called “our war there.”

The launch of an Iraq air campaign has dashed Obama’s hopes of ending direct U.S. involvement in the Middle East wars that have dominated his 51 / 2 years in office. He has repeatedly pledged there will be no U.S. combat boots on the ground in Iraq and insisted U.S. air operations are limited.

But with the Iraqi government and military seemingly incapable of stopping rapid militant advances, there were no firm indications of how and when this action would end.

As described by senior administration officials who took part in deliberations since Wednesday, Obama saw little choice. The information Dempsey relayed on his ride with the president, and in an hour-long Oval Office meeting with Obama and other top national security aides that immediately followed, was twofold.

Map: U.S. airstrikes in Northern Iraq

Thousands, perhaps tens of thousands, of Iraqis belonging to the minority Yazidi sect were dying of dehydration and starvation atop a barren mountain in northern Iraq, surrounded by militants who had vowed to kill them if they descended. Iraqi government efforts to drop food and water to them had failed, with pallets loaded with supplies crashing onto the rocks.

More ominously, outgunned Kurdish military forces, known as the pesh merga, were abandoning positions to the south and west of the nearby regional capital of Irbil in the face of a massive militant offensive. Islamist fighters were within 40 miles of the city, where scores of American diplomats and soldiers were located.

The Kurdish region in northeastern Iraq was a key part of Obama’s initial Iraq strategy. The Sunni Muslim extremists of the Islamic State group who rampaged across northwestern Iraq through June and July, quickly taking over the city of Mosul and heading south toward Baghdad, had circumvented the region and its protecting pesh merga. American military specialists, along with Kurdish and Iraqi government forces, had set up a joint operating center in Irbil from which they monitored militant progress and used the promise of more aid to press the increasingly sectarian Shiite-led Baghdad government to become more inclusive.

By the end of the Wednesday evening meeting, as the first lady waited for a late Obama to join her for dinner, the president was convinced of the need to help the Yazidis, aides said, and asked for military options to stop the militant advance into the Kurdish region.

On Thursday morning, national security officials gathered early to review a portentous update from the U.S. Embassy in Baghdad. “The situation was deteriorating very rapidly in a way that was putting Irbil potentially at risk,” said a senior official who spoke on condition of anonymity under administration-imposed restrictions. “People were fleeing Irbil.”

North of Mosul, militants had apparently seized Iraq’s biggest dam, astride the Tigris River. A breach could send massive floodwaters pouring through countless towns and villages, all the way to Baghdad, where the U.S. Embassy sat along the Tigris’ bank. Along with the threat to Irbil, aides said, control of the dam was a tripwire for U.S. action.

“We didn’t have clear confirmation,” the senior official said, but it appeared as though “the dam had fallen from pesh merga control.”

Trapped on Sinjar Mountain

Just after 10 a.m., Obama met with advisers for 90 minutes in the White House Situation Room.

What was happening to the Yazidis, they concluded, was potential genocide under the legal definition of targeting an entire ethnic or religious group for extinction. In briefings from intelligence and State Department officials, “there were stories of mass executions, reports from the mountain of people dying potentially of thirst,” the official said. “Women being essentially enslaved.”

Although the team had many discussions over the years about mass atrocities and humanitarian disasters around the world, “I had not heard the word genocide used in the Situation Room before,” the official said.

For Obama, he said, what was happening to the Yazidis was a category of disaster that was “qualitatively different from even the awful things we’ve confronted in other parts of the region. . . . It kind of shakes you up and gets your attention.”

Humanitarian airdrops of food and water to the Yazidis had already been scheduled for Thursday night. At the same time, the official said, the president indicated he was “inclined to move forward” with airstrikes and was briefed on options.

Obama left to sign a veterans bill at Fort Belvoir. On Thursday afternoon, the meeting was reconvened in the basement Situation Room for two hours, this time joined on video screens by Secretary of State John F. Kerry, traveling in Afghanistan, and, from India, Defense Secretary Chuck Hagel. The U.S. ambassador to the United Nations, Samantha Power, was on a separate screen, as was the head of the U.S. Central Command, Gen. Lloyd Austin.

By the end of the session, Obama had made his airstrike decision, and discussion turned to how it would be shared with Congress and announced to the American people. “The president was very clear that he wanted to continue to have limiting principles on our engagement,” the official said. “He would not be putting U.S. combat forces back on the ground. . . . He did not want to create a slippery slope. He wanted to identify clear objectives that are in our national interest, in support of our strategy in Iraq, but don’t lead us in a direction that we don’t want to go.”

Outside the White House, news had already begun to leak that humanitarian airdrops were imminent and strikes by U.S. warplanes against the militants were likely to come close behind. Journalist calls flooded in, mostly ignored by senior officials who worried that any confirmation of the timing of the airdrops — with warplane-escorted cargo aircraft flying low and slow over the mountain — would put them at risk from militant ground fire.

Obama scheduled his public announcement for 10 p.m. Washington time, when the first cargo planes would have already dropped their pallets of fresh water and packaged military meals and cleared the danger zone in pre-dawn northern Iraq.

“Today I authorized two operations in Iraq,” he said at a podium set before a camera and a handful of reporters in the State Dining Room. “Targeted airstrikes to protect our American personnel, and a humanitarian effort to help save thousands of Iraqi civilians who are trapped on a mountain without food and water and facing almost certain death. Let me explain the actions we’re taking and why.”

Airstrikes, he said, would protect Americans under threat in Irbil and Baghdad, and, if necessary, help break the mountaintop siege.

Humanitarian airdrops were part of America’s responsibility not to turn a “blind eye” when “we have the unique capabilities to help avert a massacre,” Obama said.

“My fellow Americans,” he said, “the world is confronted by many challenges. And while America has never been able to right every wrong, America has made the world a more secure and prosperous place. And our leadership is necessary to underwrite the global security and prosperity that our children and our grandchildren will depend upon.”

At 6:46 a.m. Friday, the Pentagon announced that American jets — F-18 Hornets carrying 500-pound laser-guided bombs — had released their weapons at Islamic State artillery that had been pounding pesh merga positions outside Irbil.