The accident occurred at around 3:30 p.m. as workers were conducting pipeline maintenance at a site in Collin County, north of Farmersville, the sheriff’s office said, NBC News reported.
The scene is safe, but officials asked people to avoid the area.
The people killed were not identified. The explosion occurred as subcontractors for Atmos Energy were conducting maintenance, the sheriff's office said.
Atmos Energy said in a statement that its technicians are working with first responders.
"Our prayers are with those who were affected by the events in Farmersville, Texas today. Out of respect for their privacy, we are not releasing any names or additional details at this stage," the company said.
The FBI was asked to help because they have expertise in processing scenes after an explosion, the sheriff's office said.
Farmersville is around 35 miles northeast of downtown Dallas.
ZZ/PR