Jordanian terrorist Abu Musab al-Zarqawi's Sunni rebel group, al Qaeda in Iraq, claimed responsibility for the police station attack. The claim, which appeared on an Islamic Web site, could not immediately be verified.
"The destructive effect that such operations has on the morale of the enemy inside and on its countries and people abroad is clear," the claim said.
The attacks occurred in the western Amil district and in the Sunni Muslim stronghold of Azamiyah, where police said a car bomb exploded at a Shiite mosque called Hameed al-Najar, killing 14 people and wounding 19.
Azamiyah was a major center of Sunni support for Saddam Hussein, and the targeting of the mosque may have been a bid by Sunnis to stoke civil strife in the area. It wasn't clear who was behind the bombing.
In other developments:
In the Amil attack, gunmen stormed a police station near the dangerous road to Baghdad International Airport, killing 16 policemen, looting weapons, releasing detainees and torching several cars, Police Capt. Mohammed al-Jumeili said. He said several policemen were wounded.
U.S. military spokesman Lt. Col. Jim Hutton said the battle began when gunmen in 11 cars attacked the station with rocket-propelled grenades and small arms fire. He said a U.S. military Humvee was also damaged. There were no American casualties.
Detainees being held at the station were also hurt, al-Jumeili said. There was no word on the insurgents' casualties.
The rebels had first shelled the station with mortars. Thick black smoke rose from the burning vehicles after the attack.
The claim from al-Zarqawi's group said 30 people were killed in the Amil attack and only two escaped. The group also claimed responsibility for an attack on a police station in Azamiyah, the same neighborhood where the mosque was bombed. There were no reports of casualties from the strike on that police station.
In the same claim, Zarqawi's group said it attacked two police patrols in the western Baghdad area of Nafq al-Shorta, killing everyone, but that could not be verified.
The attacks were the latest against Iraq's police and security services, which have been targeted throughout central, western and northern Iraq in recent weeks.
The U.S. Embassy on Thursday barred employees from the dangerous highway.
Despite the violence, a top Iraqi official insisted the security situation had improved since U.S. forces scattered insurgents in the Sunni Muslim city of Fallujah last month.
To provide security for the election, the U.S. government has announced it is raising troop strength in Iraq to its highest level of the war. The number of troops will climb from 138,000 now to about 150,000 by mid-January — more than in the 2003 invasion.
While Iraq's Kurds and majority Shiites back the elections, Sunni groups have demanded a postponement because of the poor security. President Bush dismissed those calls Thursday, insisting the elections must not be delayed.
"It's time for Iraqi citizens to go to the polls," Bush told reporters in the Oval Office.
U.S. senators visiting Iraq on Thursday said they were pleased with Bush's decision raising troop levels, but criticized him for not doing so earlier.
"We should have leveled with the American people in the beginning," Sen. Joseph Biden, a Democrat from Delaware, told reporters. "It was absolutely inevitable" that more troops would be needed, he said.
The U.S. Embassy decision to ban its employees from using the highway to the airport followed a nearly identical warning Monday from Britain's Foreign Office. The embassy also cautioned Americans in Iraq to review their security situation and warned those planning to travel to Iraq to consider whether the trip was "absolutely necessary."
However, Qassim Dawoud, Iraq's national security adviser, said insurgent attacks were down since the invasion of Fallujah. He provided no details but said Iraq didn't need U.S.-led coalition forces' help to safeguard the election.