Little Elm Police Chief Rodney Harrison says Detective Jerry Walker died Tuesday night at a Denton hospital hours after the shooting.
Authorities say the episode began about 3pm Tuesday with the report of a man outside a house, armed with a long gun. Denton County sheriff's Lt. Orlando Hinojosa says officers arrived to find an armed man screaming at them from a backyard.
As officers withdrew, the man ducked into the house and fired from a window, striking Walker.
Tactical squad officers arrived and a standoff ensued. Just before 10:30pm, authorities announced that the suspect was found dead by police.
The Associated Press contributed to this report.