Officials inside the ministry said the attackers could not breach key buildings as they are located far from the main entrance and there is a wide flat space inside the compound, helping Afghan forces to subdue the attack quickly.
An apparent vehicle bomb and an exchange of gunfire between militants and security forces near the Interior Ministry building in Kabul is the latest in a series of attacks in the Afghan capital in recent weeks.
Two other suicide bombers then clashed with the security forces, a spokesman for the provincial police chief, Shapoor Ahmadzai said.
The Taliban have not officially responded, but deadly attacks have proliferated since then, particularly in Kabul, which has become the most risky place in the country for civilians.
Al Jazeera's Jennifer Glasse, reporting from Kabul, said it was a complex attack as fighters attempted to enter the heavily fortified ministry.
The firefight ended by 3 p.m., he said, and all the gunmen had been killed.
The US, meanwhile, confirmed strikes against the insurgents in Helmand province with "more than 50 casualties".
"It was 5 in the morning when the Taliban exploded a auto bomb near the First District Police Headquarters and three suicide attackers entered the building", Mr. Ahmadzai said. Both the ISIS affiliate and the Taliban have launched several attacks in Kabul in recent months, killing hundreds of people.
Witnesses said the assailants arrived in an SUV, a type of vehicle mostly used by Afghan authorities and USA -led troops in the country.
North and South Korean leaders hold surprise 2nd summit
Trump blamed the cancellation on the " tremendous anger and open hostility " in a recent statement by the North Koreans. Trump on Friday night said the historic June summit with Kim could go ahead following talks between the two countries.
Mr. Danish, the ministry spokesman, said the assailants had been in vehicles that made it seem as if they were from the global coalition.
Danish said one police officer had been killed and five civilians wounded.
The use of captured USA uniforms is a long-standing tactic of militant groups in nations like Afghanistan, where long-term U.S. military presence means a lot of such gear is available. His spokesman, Lt. Col. Martin O'Donnell, said earlier that more than 50 were killed but that an exact count has not yet been established. He said all coalition troops had been accounted for after the attack. "We've seen this in other conflicts, such as Colombia, where the two sides were talking about peace at the same time that they were fighting each other on the battlefield".
That facility was attacked in February by suicide bombers in ambulances who killed more than 100 people, many of them police officers. A suicide vehicle bomb was set off at the gates before three gunmen in suicide vests stormed the compound. Among the wounded were two children, the media reported.
The nomination, which will elevate Gen. Miller to a four-star general, has been made amid a brutal spate of Taliban terrorist attacks and high-profile US military operations that have bloodied both sides during this year's fighting season.
Image copyright EPA Image caption Cleaning up in Kabul - the capital keeps getting hit by attacks Who are the Taliban? He said all three were shot and killed by security forces within minutes of the initial attack, adding that a number of nearby homes were damaged.
On Tuesday, Taliban fighters overran the center of Chora district in the southern province of Uruzgan.
Gen. Nicholson expressed concern that Afghan troops seeing people wearing USA uniforms and driving a U.S. vehicle might "hesitate", but that immediate engagement was exactly what the Afghan forces were supposed to do.
The militants were also threatening to overrun parts of Takhar province in the country's north this week, claiming to have seized arms and equipment after seizing police checkpoints in the besieged Kwajah Ghar and Dasht-e Qalah districts along the Tajikistan border.