Police had rushed to the site after receiving complaints of a fight inside. The bar's doors were locked.
The stampede started when some kind of gas was released, Martinez said.
About 180 people were in the bar, which has a capacity of 30, according to local media.
Martinez said the origin of the gas was being investigated. But prosecutors told El Tiempo newspaper that a police officer had released it.
The bar's owner and witnesses accused police of having caused the deaths by using excessive force.
Bogota Mayor Gustavo Petro took to Twitter to criticize the police team's tactics.
"It cannot be that a police intervention kills more people than if they had not intervened. The problem lies in the methods of intervention."
Meanwhile, the National Police announced that it was suspending two uniformed officers who had been at the bar, in order to facilitate the investigation.
Police "began pounding down on the door and throwing tear gas below," owner Estephanya de la Pena told reporters.
"People began to choke. I opened for people to leave and police would not let them. They (the police) began using tazers and beating them."
Martinez said a team of investigators would try to determine whether police committed any excesses or abuses.