For 19 hours, officers from two counties tried to persuade a man to release his 2-year-old son from the master bedroom of a Georgia home. Only when shots were fired did the standoff end Wednesday afternoon, and it was not the ending officers had wanted.

After shooting the toddler, the man then shot himself as officers entered the room, Gwinnett police said. Neither the man nor the child survived their injuries, police said.

“It didn’t turn out the way that we hoped,” Cpl. Deon Washington said Wednesday night. “But we don’t get to determine what the ultimate outcome is of any situation.”

>>Read more trending stories

Investigators had not determined late Wednesday why 43-year-old Thy Anh Ho shot little Phillip Nguyen and then himself. But police believe the incident began as an argument between Ho and his girlfriend and mother of the child Tuesday night inside a Beyers Landing Drive home in Buford.

While holding a gun, Ho threatened to kill everyone inside the home and then himself around 10 p.m. Tuesday, according to police. The woman told her teenage son to call 911.

The teenager and his mother were able to get out of the home safely, according to police. But Ho refused to surrender or allow the young boy to be removed from the home, and the Gwinnett SWAT team took over the negotiations.

“The baby is so innocent. He’s just 2 years old,” the boy’s mother, Huyen Nguyen, told Channel 2 Action News on Wednesday night.

>>Read more trending stories

She said police asked her to come out and talk, and she thought Phillip would come outside, but he followed his father. Authorities did not let her go back inside.

The standoff continued throughout the early morning hours Wednesday and past daybreak in freezing temperatures, leading the DeKalb County SWAT team to provide backup help, Gwinnett police Cpl. Michele Pihera said Wednesday afternoon.

“Any member on our SWAT team, it’s hard for them to leave a situation like this,” Pihera said. “They’ve been out here for several hours. They were hoping for a peaceful resolution. But when it comes right down to it, they need to be at their best.”

Ho had served about four months in a Georgia prison in 2012 following a conviction for theft by receiving stolen property, Georgia Department of Corrections records showed. And in 2010, Ho was added to the state sex offender registry following a criminal confinement conviction in Indiana, according to the Georgia Bureau of Investigation.

>>Read more trending stories

During the standoff, officers could hear the boy behind the master bedroom door, and at times he was running around like any toddler, Pihera said.

Around 4:40 p.m., a single gunshot was fired. As DeKalb officers rushed into the room, they found Phillip with a gunshot wound, Pihera said. Ho then turned the gun on himself, firing a second shot. No information was released late Wednesday on where the father and son were shot.

An officer was seen running, carrying the child to a waiting medical helicopter. He was flown to Children’s Healthcare of Atlanta at Egleston while Ho was taken by ambulance to Gwinnett Medical Center, according to police. Both died from their injuries, police told reporters after notifying family members.

—Photographer Ben Gray contributed to this article.