Interior Minister Suleyman Soylu said no external forces had been involved in the incident yesterday in the restive majority Kurdish city which happened during repairs on armoured vehicles.
One civilian worker employed at the facility was killed in the blast, the local governor's office said in a statement. The state-run Anadolu news agency later said a second man died of his wounds in hospital.
The blast, which could be heard in several areas across the city, added to security jitters just days ahead of a key referendum expanding President Recep Tayyip Erdogan's powers.
"There was no intervention from outside. An explosion happened during repairs to vehicles," Soylu was quoted as saying by the private NTV television.
More From This Section
The statement by the governor's office however did not specify the precise cause of the blast, though it did say it took place during repairs to an armoured vehicle. An investigation has been opened, it said.
A person who was trapped under the rubble was rescued, the Dogan news agency reported.
Images showed that the force of the blast created a large crater and caused considerable destruction to the building.
The southeast has been battered by renewed fighting between Kurdish rebels and Turkish security forces since a fragile truce collapsed in 2015.
The outlawed Kurdistan Workers' Party (PKK) has been waging an insurgency against the Turkish state since 1984 during which over 40,000 people have been killed.
The group is designated by Ankara, the United States and the European Union as a terror group.
Diyarbakir city and its region have over the last year been repeatedly hit by PKK attacks targeting the security forces.