An off-duty New York City police officer shot to death her 1-year-old son and her boyfriend, who is believed to be the child's father, before taking her own life in a Brooklyn home early Monday, authorities said.

The officer's 19-year-old son managed to escape out a back window and find police; he was not injured.

Police responded to the home on East 56th Street in the Flatbush section after receiving reports of shots fired shortly before 8:30 a.m.

When authorities entered the first-floor apartment, they found the officer's 33-year-old boyfriend dead in the doorway. The bodies of the 43-year-old officer, a 13-year cop with the 108th precinct, and the child were found in the bedroom.

All three victims died of gunshot wounds, authorities said.

The officer's teenage son told police he spoke with his mother when he first woke up Monday morning and everything seemed fine. Then, around 8 a.m., he told police he heard a gunshot -- then more gunshots -- and he saw his mother standing in the apartment with a gun in her hand.

The teenager told police he asked his mother what was happening and she apologized, according to law enforcement sources. Then the officer went into her bedroom and placed the baby on the bed. The 19-year-old son heard another gunshot and jumped out the window to find police.

An NYPD spokesman said the officer had never had any issues with the department.

A neighbor, who identified herself as an aunt, said she could find no reason for the deaths. She said the officer was always smiling and waving to her, and seemed like a happy person.

"It's terrible," Agnes Samuel, 83, said as she choked up. "For people to take a life like that. Oh, Lord!"

The investigation is ongoing.