The explosion took place in a military housing complex near the country's parliament building at 16:30 GMT.
"There are 61 injured, they were taken to 14 city hospitals. I cannot tell the exact number of victims as it is the task of the Interior Ministry, but, according to my information, at least 20-21 people have been killed. Three people died in hospitals. Three are currently in surgery," Turkish Health Minister Mehmet Muezzinoglu said earlier. The country's deputy Prime Minister and government spokesperson Numan Kurtulmus later raised the death toll to "at least 28."
An official representative of the Turkish ruling Justice and Development Party (AKP), Ömer Çelik, called the explosion a "terrorist act."
"The terrorist attack in a densely populated area once again shows the vile face of terrorism," Çelik said.
The attack targeted buses with the personnel of the Turkish General Staff, according to a statement.
Turkish President Recep Tayyip Erdogan postponed his planned trip to Azerbaijan following the deadly explosion, and Prime Minister Ahmet Davutoglu cancelled his visit to Brussels due to the attack, according to the prime minister's office.
Erdogan said Turkey's fight against "pawns" carrying out terror attacks against the country would grow more determined.
"We will continue our fight against the pawns that carry out such attacks, which know no moral or humanitarian bounds, and the forces behind them with more determination every day," a statement from the president's office reads.
The explosion reportedly took place in a military housing complex. The building of the Turkish General Staff is located in the area. The blast involved a car rigged with explosives.
Bomb technicians have searched for potential explosive devices at the site of the attack, a Sputnik correspondent reported.
A Turkish government spokesperson later reported that a controlled explosion of a suspicious package was carried out following the blast, and that it was clear the Ankara attack was well-planned.
Helicopters and drones have been seen over the area, and Internet communication was not working in several districts of the city.
According to preliminary data, 70-80 people were present at the site of the explosion.
Turkey: According to the 1st information this is a car bomb that exploded near a military base in Ankara pic.twitter.com/fIFxwAA1Ol— Adam K. Pawłowski (@adpaw13) February 17, 2016
A fire broke out at the site of the explosion. Fire brigades and ambulances arrived at the scene cordoned off by the police.