A military lawyer at Guantanamo Bay, Cuba, acknowledged Tuesday that microphones are hidden inside devices that look like smoke detectors in the rooms where defense lawyers meet detainees, but he said the government does not listen in on attorney-client communications.

Both civilian and military defense lawyers at Guantanamo Bay meet their clients at a facility known as Echo 2, a camp that has about eight meeting huts.

Navy Capt. Thomas J. Welsh, staff judge advocate at the base, said he became aware of the microphones when he saw a law enforcement agent listening in on a meeting between prosecutors and defense lawyers on a possible plea deal. The agent, wearing headphones, was sitting in a control room at Echo 2, where meetings are routinely monitored by video for security reasons.

Welsh said he was assured by the Joint Detention Group commander at the base that the audio is turned off when lawyers meet with their clients — although it can be used in other situations.

“Under my watch, definitely, we don’t listen in,” Welsh said.

Defense lawyers in the case against Khalid Sheik Mohammed, the self-proclaimed mastermind of the Sept. 11, 2001, attacks, and four co-defendants have raised concerns that the government might be listening to privileged communications.

The issue arose when an unknown government entity, believed to be the CIA, turned off the audio feed from the courtroom where Mohammed is on trial to a public gallery. The existence of such a “kill switch,” as well as the immediate decision to turn off the audio, caught the military judge, Army Col. James Pohl, by surprise.

The judge ruled that in the future only he could cut the audio, and he barred any other government entity from exercising that power. But the defense raised questions about the monitoring of attorney-client communications in sidebars inside the courtroom and in meeting rooms.

Maurice Elkins, the director of courtroom technology, explained that there are multiple audio feeds from the courtroom, some of which include ambient sound picked up by microphones. He said he was not aware of any capability to separate background noise that might include private conversations but acknowledged that he could not say what capabilities other government agencies might have.

The chief military prosecutor, Army Brig. Gen. Mark Martins, said this week that the government does not listen to attorney-client communications at any location.