The massacre extended a surge in sectarian attacks that began when Shiite gunmen rampaged through a Baghdad neighborhood Sunday, singling out and killing Sunnis.
Prime Minister Nouri al-Maliki warned that the unrest was threatening the future of the nation.
Maj. Gen. Ahmed al-Awad, the commander of the Iraqi army's 5th division, told state-run TV that hundreds of Iraqi soldiers raided the village of Ballour near Muqdadiyah, about 60 miles northeast of Baghdad, and rescued four survivors, then found 20 bodies elsewhere.
Al-Awad accused local police of failing to intervene.
Hospital officials said they had received 24 bodies that were handcuffed, blindfolded and shot in the head.
In other developments:
The mostly rural Muqdadiyah area has a slight Sunni majority and is in a province where sectarian tension runs high. It was the site of a recent Iraqi military operation aimed at halting an increase in insurgent activity.
Al-Awad and witnesses said the victims were Shiites separated from Sunni members of the bus station crowd. Police said their identities had not been determined and they didn't know whether all were Shiites.
"We all have a last chance to reconcile and agree among ourselves on avoiding conflict and blood. If we fail, God forbid, I don't know what the fate of Iraq will be," al-Maliki told parliament.
He warned TV stations against reports that incite violence, saying he will not hesitate to shut them down.
There has been an increase in reporting by Shiite and Sunni television stations that focuses on one's community's suffering but makes little mention of the other's.
The top American commander in Iraq said more U.S. troops may be needed to curb the violence in Baghdad.
General George Casey spoke to reporters Wednesday as he welcomed Defense Secretary Donald Rumsfeld on an unannounced trip to Iraq. Casey said he's consulting with the Iraqi government on how to counteract the rash of violence in the capital both by al Qaeda terrorists and Shiite death squads.
Asked whether that might include putting more U.S. troops in the Baghdad area, Casey replied, "It may, yes."
Rumsfeld said earlier Wednesday that the new Iraqi government is not yet ready to decide on security issues that will determine the pace of U.S. troop reductions this year.
Speaking to reporters on a flight from Afghanistan, Rumsfeld said the Iraqis are embarked "on a comprehensive review" of their security requirements, as well an effort to reconcile Sunni and Shiite groups to broaden political support for the government.
Asked how long that might take, he said, "I don't talk deadlines."
The United States had hoped that a unity government of Shiites, Sunnis and Kurds could calm sectarian tensions, convince insurgents to lay down their arms so that U.S. and its coalition partners could begin withdrawing troops starting this year.
But more than 1,607 Iraqis have been killed and nearly 2,500 wounded since al-Maliki's unity government took office May 20, according to an Associated Press count.
Despite the sectarian bloodshed, fliers were circulated in a predominantly Sunni area north of Baghdad, urging Shiite families not to flee and warning people not to hurt members of the majority sect. The fliers were purported signed by the Mujahedeen Shura Council, an umbrella organization of several Islamic extremist groups, including al Qaeda in Iraq.
In another positive sign, the Iraqi Accordance Front, the largest Sunni bloc in parliament, lifted its legislative boycott and attended Wednesday's session. It thanked the parliament for its help in seeking the release of kidnapped legislator Tayseer al-Mashhadani and called for a new spirit of cooperation.
In his speech to parliament, al-Maliki urged his countrymen to unite behind his administration's efforts to stem the bloodshed.
"It is not only the government that should be responsible. You chose the ministers and the prime ministers. You should not stand up and criticize the government," al-Maliki said in an apparent reference to some lawmakers who criticized the government because of the bad security situation.
He also said that insurgents are planning to take over Karkh, a large swath of western Baghdad.
"They have intentions to occupy Karkh, but be sure that Iraqi forces are capable of repulsing them and have started striking them," he said.