The shooting occurred just before 9 a.m. outside the Kaufman County Courthouse annex, which is across the street from the main county courthouse about 33 miles southeast of Dallas. Officials didn't immediately indicate any motive for the shooting.
Kaufman Independent School District Superintendent Todd Williams said all schools in the district were placed in lockdown as authorities searched for the suspects, and officials eventually decided to close the buildings for the day.
The name of the prosecutor was not immediately announced, pending notification of family.
Local law enforcement officials decried the shooting as an attack on the criminal justice system.
"We understand that we may come into contact with violent people but this is the next level," Kaufman County Sheriff David Byrnes said Thursday at a news conference.
Kaufman Police Chief Chris Aulbaugh said the shooting would have a major impact on the town and the county.
"Any loss of life, especially someone out there protecting the community, would have that effect," he said.
Calls to the district attorney's office Thursday were not immediately returned.
Investigators gathered in a parking lot adjacent to the annex where the prosecutor was shot. Yellow tape and law enforcement vehicles blocked the area from spectators.