(CNN) -- A 16-month-old boy rode to safety in the arms of a heavily armored and armed SWAT team member Friday after police ended a standoff with a wanted man who had been holding the boy hostage for 55 hours.
"The child is fine," Sacramento County Sheriff John McGinness told reporters.
McGinness said the SWAT team broke into the apartment early Friday evening after he had given the order to use deadly force if they had the opportunity to do so without harming the little boy.
"I gave them the absolute green light to do so if that opportunity presented itself," McGinness said. "It did, they did, the child is safe."
"This is, in fact a very, very successful operation."
Reporters on the scene said the operation began with a "flash-bang" designed to disorient the suspect, identified as Anthony Alvarez, 26. Thirty minutes later, they heard gunshots, and shortly after that, the SWAT officer emerged with the boy, carrying him to a waiting ambulance.
McGinness said the boy, identified by family members as Michael Pittman, was transferred to a hospital "to be checked out" but appeared unhurt.
"The suspect is in very, very bad shape and may have been pronounced dead by this time," McGinness told CNN affiliate KOVR.
One police officer was wounded by broken glass during the operation, McGinness said, and was taken to a hospital for treatment. The officer was not seriously hurt, the sheriff said.
Alvarez had been holding authorities at bay since Tuesday, when police tried to arrest him in connection with a series of armed robberies, the attempted murder of police officer and a possible connection to a homicide in the San Francisco Bay area, a police spokeswoman said.
The drama began when Alvarez grabbed his cousin's two children -- ages 4 years and 16 months -- before fleeing into an apartment as police approached, according to Sacramento County Sheriff's spokeswoman Sharon Chow. Deputies rescued the oldest child through a rear window, she said, but Alvarez had been inside since with the infant.
Chow said Alvarez opened fire at one point on a robot SWAT teams tried to send in to get a visual on the situation. For the most part, she said, Alvarez avoided being seen, although from time to time he has been seen carrying the child, which prevented police from taking action.