Three BBC journalists were held at gunpoint for four hours by Israeli troops in the West Bank on Thursday.
The television crew was accompanying a Palestinian doctor as he visited an elderly patient in the city of Nablus.
The five were then held by seven Israeli soldiers who had taken over the woman's home, the BBC said.
Israeli military sources said the journalists had walked into an undercover operation and were held so as not to expose the mission.
The soldiers confiscated the journalists' phones and videotape and banned them from making contact with anyone until they were released.
"Unfortunately there was no other way the soldiers could have acted without exposing themselves and endangering themselves," said army spokeswoman Maj Sharon Feingold.
The journalists did not know there were troops in the apartment before they entered, said Nick Springate, the BBC's acting bureau chief in Jerusalem.
He said the BBC planned to lodge a formal complaint with the Israelis.