A car bomb struck a crowded market in the northern city of Tal Afar on Friday, killing at least 18 people and wounding 25, police said.

The attack was the latest in a series of deadly bombings that show militants retain the ability to wage high-profile attacks despite recent security gains, particularly in northern Iraq.

The car was parked when it exploded by the food market at about 6:30 p.m., when the area was packed with shoppers, according to a senior police official in the nearby city of Mosul.

A security official in Tal Afar said the blast occurred in the Wahda commercial district less than 30 minutes after the expiration of a regular weekly vehicle ban to prevent bombers from targeting weekly Islamic services.

Both officials, who spoke on condition of anonymity because they weren't authorized to release the information, gave the casualty toll as 18 killed and 25 wounded.

The U.S. military confirmed the attack but said initial reports showed 15 people killed and 50 wounded.

Tal Afar, a predominantly Shiite Turkomen city 260 miles (420 kilometers) northwest of Baghdad, was the site of another car bombing on July 16. At least 18 people were killed in that attack, including seven children.

The city, which is west of the volatile city of Mosul, was targeted in offensives by U.S. and Iraqi troops that prompted American leaders to describe it as a success story in the effort to stabilize Iraq. But sporadic attacks continue.

Mosul and surrounding areas are the site of ongoing U.S.-Iraqi operations against al-Qaida in Iraq and other insurgents.

Ethnic tensions also have been rising between Turkomen, Arabs and Kurds in the region as they are locked in a bitter dispute over the oil-rich city of Kirkuk.