"I call on the people to start resisting the invaders instead of killing each other," Saddam told the court on Wednesday.
But he urged Iraqis to avoid civil war, otherwise "you will live in darkness and bloods of river".
Just before the media was turned out of the gallery and the cameras switched off, Saddam told judge Rauf Abdel Rahman he had no right to interrupt him as he had been appointed by American occupiers.
"You are charged with murder, stop your political speech," the judge said.
Saddam - dressed in a black suit - read from a written statement in which he insisted he was Iraq's elected president and began to address the Iraqi people about the bloody wave of sectarian violence that has rocked the country since the bombing of a major Shia shrine last month.
"What pains me most is what I heard recently about something that aims to harm our people," Saddam said. "My conscience tells me that the great people of Iraq have nothing to do with these acts," he said referring to the bombing of the shrine in the city of Samarra.
"I call on the people to start resisting the invaders instead of killing each other"
Abdel-Rahman interrupted saying he was not allowed to give political speeches in the court.
"I am the head of state," Saddam replied.
"You used to be a head of state. You are a defendant now," Abdel-Rahman said.
As Saddam continued reading from a prepared text, the judge repeatedly closed his microphone to prevent his words from being heard and told him to address the charges against him. Saddam ignored the judge and continued speaking.
He went on with his speech, urging Iraqis not fight each other. He praised the insurgency, saying, "In my eyes, you are the resistance to the American invasion".
"You are being tried in a criminal case for killing innocent people, not because of your conflict with America," Abdel-Rahman told him.
"What about the innocent people who are dying in Baghdad? I am talking to the Iraqi people," Saddam replied.
Saddam was the last of the case's eight defendants to testify. Though he has spoken frequently since the trial began in October, Wednesday's session was to be the first chance for the judge and prosecutors to directly question him.
Earlier during the day, Barzan Ibrahim, Saddam's half-brother and former intelligence chief, said he was brought to court because he refused a senior post in exchange for his co-operation in overthrowing Hussein government.
Barzan denied any role in the
Barzan told the judge that he was before him not because he had a role in al-Dujail case, but because he refused an offer for a senior post in Iraq if he helped the invasion.
"I refused to cooperate because I was afraid that people say I am thirsty for power," Barzan said.
Barzan denied he took part in a crackdown against Shia members of al-Dawa party who tried to assassinate Saddam in 1982.
Barazan testified for the first time in the trial of the former Iraqi leader and members of his government.
The former Iraqi leader and his officials are charged with executing 148 Shia, illegal imprisonment and torture, in a crackdown started after an assassination attempt on Saddam in the Shia village of al-Dujail in 1982. They face possible execution by hanging if convicted.
In previous sessions, purported al-Dujail residents have testified that Ibrahim participated in torturing them during their imprisonment at the Baghdad headquarters of the intelligence agency, which Ibrahim led. One woman said Ibrahim kicked her in the chest after her interrogators hung her naked upside down.
Ibrahim denied the allegation.
Ibrahim, wearing a traditional red scarf on his head, told chief judge Rauf Abdel Rahman that he visited al-Dujail on the day of the 8 July 1982 shooting attack on Saddam's motorcade and on the following day - but then "never visited it again after that."
Saddam was praised by Barzan
He said the General Security agency handled the investigation into the shooting, not his own intelligence department.
He told the court he ordered the release of al-Dujail residents who had been detained.
"I chided the security and party officials for detaining those people, I shook their (the released detainees') hands and let them go.
"I did not order any detentions. I did not interrogate anyone," he said, adding that he resigned as head of the intelligence in August 1983.
Right to respond
Reading from a statement, Ibrahim said Saddam's government had a right to respond after the Iraqi leader came under attack "from a group supported by Iran at a time when Iraq was at war with Iran," a reference to the Tehran-backed Shia al-Dawa Party that carried out the shooting.
He praised Saddam, saying he "served this country for 25 years and achieved historic accomplishments ... services, education. He is a true leader."
Ibrahim said he was badly treated after his arrest by US forces in April 2003. He said that when he was captured, his American interrogators asked him "how Osama bin Laden came to Iraq" and met Saddam. "They asked dozens of such questions with imaginary bases and assumptions," he said.
He also said he had asked for the past two years for medical tests "but no one has listened to me."
Ibrahim has made such statements previously in court - but the testimony is the first opportunity for the judge and prosecutors to directly question him.
Earlier this week, six other defendants went through similar questioning, one by one, and all insisted on their innocence.
Judge Abdel Rahman has been
accused of acting tough
One of the defendants, Awad al-Bandar - the former chief judge of the Revolutionary Court - admitted on Monday that he sentenced the 148 Shia to death, but he maintained they received a fair trial and had confessed to trying to assassinate the former Iraqi president.
His comments echoed those of Saddam in an earlier session.
Last month, Saddam admitted in court that he ordered the 148 Shia to be put on trial before the Iraqi Revolutionary Court, but said it was his right to do so because they were suspected of trying to kill him, and he acted according to his capacity as the president of the state.
Prosecutors are trying to show that Saddam's government had sought to punish the town's civilian population. Hundreds of people were arrested - including entire families, with women and young children - and detained for years, for links to the Iraq Shia al-Dawa party who allied with Iran in its war with Iraq 1980-1988.