In 15 years of dangerous missions — from midnight raids on al-Qaeda safe houses in Iraq to battling Somali pirates from the deck of a heaving Navy ship on the high seas — there had never been one so shadowed by dread. As Robert James O’Neill contemplated his jump from a helicopter into Osama bin Laden’s private garden, he was positive it would be his last.

“I didn’t think I would survive,” the former Navy SEAL said.

O’Neill, one of dozens of U.S. special operators to storm bin Laden’s hideout on May 2, 2011, said he mentally prepared himself to face death from heavily armed gunmen or from the elaborate booby traps that would surely line the approaches to the al-Qaeda leader’s inner sanctum. What he never expected was that he would secure a place in history that night, as the man who fired the bullet that ended bin Laden’s life.

O’Neill confirmed to The Washington Post that he was the unnamed SEAL who was first to tumble through the doorway of bin Laden’s bedroom that night, taking aim at the terrorist leader as he stood in darkness behind his youngest wife. In an account later confirmed by two other SEALs, the Montana native described firing the round that hit bin Laden squarely in the forehead, killing him instantly.

More than three years after the events, O’Neill agreed to publicly discuss his role for the first time, describing in unprecedented detail the mission to capture or kill the man behind the Sept. 11, 2001, terrorist attacks on New York and Washington.

His decision to talk came nearly two years after another team member, Matt Bissonnette, published a controversial account of the raid in the book titled, “No Easy Day.” It also follows what O’Neill has described as an agonizing personal struggle, as he weighed concerns over privacy and safety against a desire to have a least some control over a story that appeared likely to break, with or without his consent.

Over the past year, awareness of O’Neill’s role as “the shooter” had spread through the military community and onto Capitol Hill, where a number of members of Congress knew the story and had congratulated O’Neill personally, he said. Journalists were becoming aware of his name as well.

In the end, just a week before scheduled interviews on Fox News and The Post, O’Neill’s identity was leaked by some of his former peers. SOFREP, a Web site run by former special-forces operatives, posted an article that complained of O’Neill’s decision to tell his story on Fox News and decided to reveal his name preemptively.

The SOFREP item was subsequently picked up by the British tabloid, the Daily Mail, which reported on Wednesday that O’Neill’s father had confirmed his identity as the shooter in a telephone interview.

SOFREP published an Oct. 31 letter — apparently triggered by O’Neill’s impending TV interview — in which the commander and master chief of the Navy Special Warfare Command emphasized that a “critical” tenet of their profession is to “not advertise the nature of my work nor seek recognition for my action.”

“We do not abide willful or selfish disregard for our core values in return for public notoriety or financial gain,” the letter said.

O’Neill, in two meetings with The Post, said he had anticipated the criticism. He said his decision to go public was confirmed after a private encounter over the summer with relatives of victims of the Sept. 11, 2001, attack on New York’s World Trade Center.

In May 2011, President Obama announced that U.S. forces had killed al-Qaeda leader Osama bin Laden in a compound in Abbottabad, Pakistan. (WhiteHouse.gov via YouTube)

O’Neill, who works as a motivational speaker, had been invited to address a gathering of 9/11 family members at the National September 11 Memorial Museum shortly before its official opening. During what he described as a highly emotional exchange, O’Neill decided spontaneously to talk about how bin Laden died.

“The families told me it helped bring them some closure,” O’Neill said.

The meeting was facilitated by a member of the New York congressional delegation who asked O’Neill if he would donate his uniform to the museum’s collection.

“He insisted on doing this anonymously to honor his unit, however the incredible interest in this story made this difficult,” said Rep. Carolyn B. Maloney (D-N.Y.). “I represent thousands of individuals whose lives were forever scarred by the tragedy of Sept. 11, and Mr. O’Neill’s private words to the families who lost loved ones brought a remarkable comfort to them.”

Maloney praised O’Neill as “a great American hero and a fine, articulate gentleman who has been very careful to always praise his team for the success of this mission.”

O’Neill’s involvement in the 2011 bin Laden raid capped a career that had already been extraordinary, by any measure. Tall and athletic with boyish features and reddish-blond hair, O’Neill became a SEAL in 1996 at age 20, and was eventually promoted to elite SEAL Team Six.

He eventually received 24 honors and commendations, many of them earned for multiple tours in Iraq and Afghanistan, as the leader of missions to capture or kill suspected al-Qaeda-allied insurgents.

Between tours, his team was pressed into service for rescue missions in far-flung corners of the world. O’Neill was among the SEALs who assisted in the 2009 rescue of merchant marine Capt. Richard Phillips from pirates off the coast of Somalia, an operation depicted in the 2013 movie “Captain Phillips.”

O’Neill’s experiences during the bin Laden raid were first described last year to journalist Phil Bronstein for a February 2013 Esquire magazine article that, by agreement, referred to him only as “the shooter.” In the piece, he described advancing through bin Laden’s compound in Abbottabad, Pakistan, with five other SEALs, eventually reaching the third floor, where bin Laden lived with his wives.

As other team members peeled off to search different rooms, O’Neill found himself in the No. 2 position, behind the point man, for the final assault on bin Laden’s bedroom. When bin Laden briefly appeared at the door, the SEAL at the front of the line fired a shot that apparently missed.

“I rolled past him into the room, just inside the doorway,” O’Neill recalled. “There was bin Laden, standing there. He had his hands on a woman’s shoulders pushing her ahead.”

Though the room was dark, O’Neill could clearly see bin Laden’s features through his night-vision scope.

“He looked confused,” O’Neill was quoted in the Esquire magazine as saying. “He was way taller than I was expecting. He had a cap on and didn’t appear to be hit.”

Bin Laden was “standing and moving,” thrusting one of his wives in front of him as if to use her as a shield.

“In that second I shot him, two times in the forehead,” he said. “Bap! Bap! The second time, as he is going down. He crumbled to the floor in front of his bed and I hit him again.”

O’Neill told The Post that it was clear bin Laden had died instantly, his skull split by the first bullet.

“I watched him take his last breaths,” he said.

He dismissed any talk of heroism, describing his actions as “muscle memory,” the result of continuous, repetitive training, including countless rehearsals of the Abbottabad raid using full-scale models. He described the “heroic” actions of other SEALs, including those of the point man, who tackled two women in the bedroom to create the diversion that allowed O’Neill to get off his shots.

O’Neill said the SEALs had little time to contemplate the magnitude of the evening’s events. After taking photographs and squeezing bin Laden’s frame into a body bag, they scrambled to collect computer drives and other obvious sources of intelligence.

Then they moved bin Laden’s wives and children away from the house before boarding their helicopter for a sprint across the Pakistan-Afghanistan border, just ahead of approaching Pakistani fighter planes.

Hours later, O’Neill was back at an American military base in Jalalabad, Afghanistan, eating a breakfast sandwich while bin Laden’s body lay in an adjacent room. Just then, President Obama appeared on a television screen.

“The United States has conducted an operation that killed Osama bin Laden, the leader of al-Qaeda and a terrorist who’s responsible for the murder of thousands of innocent men, women and children,” Obama said.

O’Neill said he glanced up at the screen and then at bin Laden’s body bag.

And then finished his sandwich.