The assault before dawn on Wednesday was similar to one carried out the day before on a police station and a jail in Miqdadiya, northeast of Baghdad, in which 22 people were killed.
The gunmen used automatic rifles and rocket-propelled grenades to enter the station in Madaen, which is about 20km southeast of Baghdad, a spokesman for police in Baghdad said.
Sources named the police commander killed as Colonel Ahmed Jabar, head of a so-called stability unit based in a heavily fortified police station. The other officers were not identified.
Madaen, a mixed Sunni Arab and Shia Muslim town, is in an area that has been dubbed the Triangle of Death because of the frequency of rebel attacks.
Police said they raided houses in the town after the attack and detained 70 people, including a Syrian who had leaflets by the leader of al-Qaida in Iraq, Abu Musab al-Zarqawi.
Police say the palm tree orchards around Madaen make it easy for fighters to infiltrate the town to plant roadside bombs.
The latest attacks took place as Iraq's political leaders, under pressure from Washington, continued to wrangle over forming a new government three months after elections.
A government of national unity is widely seen as the best hope of bringing stability to Iraq.