ANKARA: Two attackers killed five people and wounded 22 others on Wednesday in what Ankara called a terrorist attack at the Turkish Aerospace Industries headquarters, where witnesses said they heard gunfire and an explosion.

Interior Minister Ali Yerlikaya said both attackers were killed after the attack, adding two of the injured are in critical condition. TV broadcasters showed footage of armed assailants entering the TUSAS building near Ankara.

"Two terrorists were neutralised in the terror attack on the TUSAS Ankara Kahramankazan site," Yerlikaya said.

"Sadly, we have five martyrs and 22 wounded in the attack. Three of the injured were already discharged from hospital, 19 of them under treatment," he said.

Yerlikaya said the perpetrators were "highly likely" members of the outlawed Kurdistan Workers' Party (PKK).

"The style of the act shows that it is highly likely the PKK that carried out the attack. Once identification is completed and other evidence become clearer, we will share more concrete information with you," he said.

Turkish air forces conducted airstrikes in northern Iraq and northern Syria and destroyed 32 PKK targets, the defence ministry said late on Wednesday, adding that many PKK members were killed.

Prosecutors have launched an investigation, state-run Anadolu Agency reported.

Turkish President Tayyip Erdogan, alongside Russia's Vladimir Putin at a BRICS conference in the Russian city of Kazan, condemned the attack and accepted Putin's condolences. NATO, the United States and the European Union also condemned the attack.

Witnesses told Reuters that employees inside the building had been taken to shelters by the authorities and no one had been permitted to leave for a few hours. They said the blasts they heard may have taken place at different exits as employees were leaving work for the day.

Witnesses later said evacuation of personnel from the TUSAS campus had started and buses were allowed to leave as the operation had ended.

Broadcasters showed images of a damaged gate and footage of an exchange of gunfire in a parking lot, as well as the two attackers carrying assault rifles and backpacks as they entered the building. Ambulances and helicopters later arrived.

TUSAS is Turkey's largest aerospace manufacturer, currently producing a training craft, combat and civilian helicopters, as well as developing the country's first indigenous fighter jet, KAAN. Owned by the Turkish Armed Forces Foundation and the government, it employs more than 10,000 people.

NATO Secretary General Mark Rutte condemned the attack and said the military alliance would stand with its ally Turkey.