At least seven people have been killed in the Nigerian capital Abuja in what security forces said was a shootout with Boko Haram, but witnesses at a hospital said it was an attack on unarmed squatters.
The incident happened in a building near a walled-off residential compound for legislators on Friday.
Nigeria's SSS intelligence service said its forces had been searching an area behind the Apo Legislative Quarters for weapons after a tip-off from arrested members of the anti-government Boko Haram group when they came under fire and shot back.
It mentioned injuries but no deaths.
If Boko Haram, which wants to impose Islamic law in northern Nigeria, did open fire, it would be the first clash involving the fighters in Abuja this year.
A doctor in a hospital morgue, who declined to be named because he was not authorised to speak, said seven people had been killed in the incident.
A Reuters reporter saw a police vehicle dump three bodies then drive off, leaving a trail of blood.
An ambulance deposited another body, with bandages wrapped around the bloodied torso.
There was no security presence at the hospital, as might have been expected if there had been Boko Haram suspects among the wounded.
Six witnesses, including two people injured by bullets, told Reuters the building was a house owned by a military man that had been occupied by about 100 squatters who were refusing to leave.
Security forces raided it and opened fire on the squatters, they said.
Boko Haram has been responsible for hundreds of killings this year, although Nigerian forces are also often accused of executing suspects, then labelling them Boko Haram.
A statement from the State Security Services (SSS) said: "No sooner had the team commenced digging for the arms than they came under heavy gunfire attack by other Boko Haram elements.
"Some persons were injured and 12 others have been arrested in connection with the incident."
Witnesses disputed the SSS account. A 28-year-old shoe hawker in torn clothes, who gave his name only as Mohammed for fear of reprisals and nursed a bloody bandages around both legs, said he was one of the squatters.
He said the owner had come on Wednesday and told them to leave, but they had refused because they were paying a security guard to be allowed to stay there.
On Thursday the security guard had left, then at around midnight, five pick-up vehicles arrived carrying armed personnel.
"They began firing. It was crazy," Mohammed said. "We were running helter skelter and bullets were flying."
Five other witnesses gave similar accounts, but two security sources said they believed the SSS had gone to the building to identify Boko Haram suspects and recover arms.
A violent week
The shootout in Abuja came just three days after at least 87 people were killed in Nigeria's northeast in an attack carried out by alleged Boko Haram fighters disguised in military uniforms.
"Eighty-seven bodies were recovered in the bush and our people are still searching for more," Saidu Yakubu, of the Environmental Protection Agency in Borno state, said on Thursday.
Boko Haram also burnt scores of homes and buildings in the late Tuesday assault, according to locals, who reported seeing corpses littering the roadside.
Details of the attack in the town, which has been previously been targeted by Boko Haram, first emerged on Wednesday.
According to army General Mohammed Yusuf, who also briefed the governor, troops ran out of ammunition while fending off the assault.
The motivation behind the Borno attack was not immediately clear, but Boko Haram members have repeatedly carried out revenge attacks against residents over the emergence of vigilante groups that have formed to assist the military.
The fighters say they are fighting to create an Islamic state in Nigeria's mainly Muslim north, but their aims have repeatedly shifted and much of their violence has largely targeted civilians.