BAGHDAD - Militants on Monday targeted polling stations across much of Iraq and a crowd of Kurds jubilantly dancing on the street as soldiers and security forces cast ballots two days ahead of parliamentary elections, officials said. The attacks, including a suicide bombing northeast of Baghdad, left at least 46 people dead.

The wave of attacks was an apparent attempt to derail the balloting process and discourage the rest of the country's 22 million registered voters from going to the polls on Wednesday in the first nationwide elections since the 2011 withdrawal of U.S. forces.

The early balloting for police and soldiers is meant to free up the one-million-strong military and security forces so they can protect polling stations and voters on election day.

More than 9,000 candidates are vying for 328 seats in the parliament, which is widely expected to be won by an alliance led by Shiite Prime Minister Nouri al-Maliki, who is likely to seek a third four-year term in office.

The day's worst attack took place in the Kurdish town of Khanaqin, 87 miles northeast of Baghdad close to the Iranian border. A suicide bomber walked toward a crowd of Kurds performing a traditional dance and blew himself up, killing at least 25 and injuring 35.

The Kurds were celebrating the appearance on TV of Iraq's ailing President Jalal Talabani, a Kurd who is being treated in Berlin since December 2012 following a stroke. The nearly 80-year-old Talabani was seen sitting in a wheelchair smiling and waving his index finger, stained purple, flanked by clapping relatives. Few details have been released about the severity of Talabani's illness.

No one claimed responsibility for the attack, which bore the hallmarks of Sunni Arab militants.