"There was a suicide attack which killed two of our soldiers," Binali Yildirim said, indicating they died while checking roads in the town which rebels claimed they had seized from Islamic State militants yesterday.
However, the Turkish military said they were killed by a mine in a blast which also wounded three other soldiers.
The soldiers had been checking the area for explosives left behind by IS.
Speaking to reporters in Ankara, Yildirim said "the most rigorous cleaning operations" were under way in Al-Bab which he said was "full of bombs and hand-made explosives".
Also Read
Al-Bab, which is 25 kilometres south of the Turkish border, was the extremists' last stronghold in the northern province of Aleppo.
Turkey launched its unilateral military operation supporting Syrian opposition fighters last August, targeting IS as well as Syrian Kurdish militia.
After a lightning advance, it became mired in a drawn-out conflict in Al-Bab which proved to be the bloodiest fight in Turkey's campaign, where Ankara suffered most of its 71 losses thus far.
Disclaimer: No Business Standard Journalist was involved in creation of this content