A federal judge has denied a request by lawyers for accused Boston Marathon bomber Dzhokhar Tsarnaev that he be privately photographed in prison to show changes in his physical and mental condition, allowing only his legal team to see the pictures, instead allowing federal prison officials to take photographs of the alleged terrorist that will then be distributed to both prosecutors and defense attorneys.

“The defendant contends that his ‘injuries over time’ provide evidence of ‘his evolving mental and physical state’ which, in turn, is probative of ‘the voluntariness of (his) statements and sentence mitigation arguments,’ ” wrote federal Magistrate Judge Marianne. B. Bowler in a decision issued today.

Tsarnaev’s lawyers had first made their request on May 7 in a sealed, ex parte motion they sought to keep from prosecutors and the public, but Bowler’s decision makes clear she ordered defense attorneys to clue in prosecutors so she could hear their arguments on the issue. She noted that both sides filed position papers with her in secret, but “this court finds no basis to seal this memorandum and order,” which brought the legal battle to light today.

Tsarnaev’s defense team argued that they should be allowed to circumvent prison rules at the Federal Medical Center Devens barring possession of cameras and other recording equipment by inmates or visitors within the facility, the judge said. She said federal courts give “wide-ranging deference” to prison administrators to establish “policies and practices that in their judgment are needed to preserve internal order and discipline and to maintain institutional security.”

Tsarnaev’s lawyers had argued that the photos of their client should be considered the work product of the defense and should therefore be private from the eyes of prosecutors and prison officials. But Devens officials offered to have corrections officials take the photographs and the judge agreed that was an adequate compromise. She also refused to keep them from prosecutors.

“This reasonable accommodation adequately addresses the defendant’s need to document the defendant’s condition,” Bowler wrote. “The defendant also fails in his burden of showing that future photographs taken by a Bureau of Prisons staff member are protected by the work product doctrine and therefore cannot be produced to the government.