The mayor of Amerli and army officers said troops backed by militias defeated fighters from the Islamic State (IS) to the east of the town. Fighting continued to the north of Amerli.
Mayor Adel al Bayati said: "Security forces and militia fighters are inside Amerli now after breaking the siege and that will definitely relieve the suffering of residents."
The advance of the Iraqi forces comes after the US military carried out air strikes on IS militant positions near the town and airdropped humanitarian supplies to trapped residents there. More aid was dropped from British, French and Australian planes.
Amerli resident Amir Ismael said: "I can see the tanks of the Iraqi army patrolling Amerli's street now. I'm very happy we got rid of the Islamic State terrorists who were threatening to slaughter us."
Armed residents had managed to fend off attacks by IS fighters, who encircled the town and regarded its majority Shi'ite Turkmen population as apostates. More than 15,000 people had remained trapped inside Amerli.
Pentagon press secretary Rear Admiral John Kirby said the aid came at the request of the Iraqi government and the US military conducted air strikes against IS militants to support the aid delivery. Mr Kirby said the scope and length of time of the operations would be limited as needed to address the humanitarian crisis in Amerli and protect the civilians trapped there.
US Central Command said five more air strikes had taken place at the weekend against IS militants near Mosul Dam.
Those attacks, carried out by fighter aircraft and unmanned drones, brought to 115 the total number of air strikes across Iraq since August 8.
IS has captured large swathes of northern Iraq since June and last month dealt a bruising defeat to Kurdish forces.