The Orlando SWAT team commander who led the final assault that brought an end to Sunday’s massacre at a gay nightclub is defending the decision to wait nearly three hours after the initial shooting before breaching the club’s wall.

“Initially it was an active shooter,” Capt. Mark Canty told Yahoo News Global Anchor Katie Couric on Thursday. “Once the shooting stopped, it became a barricaded gunman. And our officers acted accordingly — they surrounded it, they contained it, and we looked for ways to get the hostages out.”

The gunman, 29-year-old Omar Mateen, opened fire inside Pulse Orlando shortly after 2 a.m., authorities and witnesses say. An off-duty police officer who was working as a security guard just outside the club’s entrance confronted Mateen and exchanged gunfire, and the shooter ran back inside, holing up in a bathroom, where police say he held several hostages.

“As the SWAT team arrived, we were developing a plan, and as we were developing that plan, we were learning there were more people inside,” Canty said. “We were acting as quickly as we could. From the beginning of the incident, officers were rescuing people. And I will tell you that the SWAT officers, the patrol officers, they did everything they could to rescue as many people as they could.”

More than three hours passed before a SWAT team successfully breached the wall of the club with an armored vehicle, engaged Mateen in a shootout as he tried to flee and killed him, putting an end to a massacre that left 49 dead and 53 wounded — the deadliest mass shooting in U.S. history.

On Monday, Orlando Police Chief John Mina said police believed that Mateen — who called 911 several times during the standoff — had explosives inside, complicating the rescue operation.

“There was every indication that the place was booby-trapped,” Orlando Mayor Buddy Dyer told Couric on Thursday. “And they had to take everything in account.”

Several experts have said the delay may have contributed to the death toll.

Story continues

“Action beats inaction 100 percent of the time,” Chris Grollnek, an active-shooter expert and a retired police officer and SWAT team member, told the Associated Press. “When we see SWAT teams respond and not making entry [it] creates victims. Period. End of story.”

Related: Survivors of massacre question Orlando police delay in storming nightclub

But Canty said both SWAT and patrol officers pulled “several” people out of the club during the three-hour standoff.

“It’s a kind of misnomer that we weren’t in the building,” Canty said. “We had officers in the building from the beginning. And from the onset, they were pulling people out of the club.”

Earlier Thursday, President Barack Obama and Vice President Joe Biden traveled to Orlando to meet with victims, families and first responders.

“The president was extremely supportive, very compassionate with the victims, and set just exactly the right tone that we needed,” Dyer said. “Sunday was absolutely the worst day we’ve ever experienced in the city of Orlando. But he carried the same message that we’ve been delivering: that although it was the worst day in the history of Orlando, we’re so proud of our first responders, of the doctors in the hospital that saved so many lives, how our community has responded with love, and compassion and unity. This is gonna make us a stronger community.”

Dyer admitted that the city of Orlando was left reeling by a mass shooting that was bookended by Friday’s slaying of singer Christina Grimmie after a concert and Tuesday’s death of a 2-year-old boy who was dragged into the water by an alligator at Disney World. Divers discovered the toddler’s body in a man-made lake at the resort Wednesday afternoon.

“I don’t think anybody would have predicted any one of these events, let alone all three of ’em within the span of five or six days,” Dyer said. “So we are doing a lot of grieving here, but we’re doing a lot of supporting each other and loving each other as well.”

______

Related slideshows:

Slideshow: Funerals and memorials for slain Orlando victims >>>

Slideshow: Obama visits families of the Orlando massacre victims >>>

Slideshow: Victims of the Florida nightclub shooting >>>

Slideshow: Front page coverage of the Orlando mass shooting >>>

Slideshow: World reacts to Orlando mass shooting >>>

Slideshow: Shooting rampage at Florida nightclub >>>