Police closed off the area where the explosion took place, at the entrance to a car park for both the prime ministry and the Appeals Court.
Police described it as a percussion bomb, a device which makes a loud noise, but causes little damage.
"It is understood that the explosive material was 150 grams (5.2 ounces) of light explosives placed inside a plastic bottle," Ankara Governor Alaadin Yuksel told reporters.
Asked how such an attack could have happened at high security area of the capital, he said: "We are examining everything. Our colleagues are examining the camera recordings."
The blast follows a remote-controlled bomb attack in Istanbul on Thursday last week which wounded 15 policemen and one civilian.
Copyright Reuters, 2012