"Daesh launched an attack with a suicide car bomb and gunmen on the 2nd border guard regiment near Trebil," an officer in the border guard told AFP, using an Arabic acronym for IS.
"The attack came from several directions and killed 15 border guards, including two officers," he said, speaking on condition of anonymity. Local officials confirmed the attack and death toll.
Iraqi security forces have been on high alert as government troops launched operations this week to retake the last remaining major IS stronghold, in West Mosul.
IS is thought to step up its suicide attacks as the noose tightens around its holdouts.
On Friday, Iraqi forces began advancing into West Mosul, after capturing the city's airport from IS, establishing a bridgehead into the contested neighbourhoods.