The bodies of the victims, some of them burned, lay on the streets of the Ketu suburb where Hausas and militants from the Yoruba Oodua Peoples Congress (OPC) continued to fight after armed riot police moved in to quell disturbances.
"The police have instructions that any criminal should be shot on sight. Anyone who calls himself OPC should be arrested and if he doesn't agree he will be shot on sight," Mr Obasanjo said.
"We cannot allow this country to be overtaken by hoodlums and criminals," he said on television. "When people decide to behave like animals then they must be treated like animals."
The clashes are the latest in a chain of violent inter-tribal incidents since Mr Obasanjo took office in May to end 15 years of debilitating military rule.
Ketu residents said fighting broke out between the rivals before midday over control of the sprawling Mile 12 food market.
Many Hausa traders - whose origins lie in northern Nigeria - fled, but others armed themselves with knives to protect their homes. OPC militants patrolled some streets with machetes and clubs.
"This is the first time in my life I have seen someone dragged from their home and killed on the spot." said one weeping resident of the suburb.
Tension has been high since the end of army rule, when the north relinquished the power it held under military and civilian governments since independence from Britain in 1960.
Northerners complain Mr Obasanjo has favoured his Yoruba kinsmen in appointments, despite the fact that he did poorly in Yoruba regions during the February election.