PHOENIX -- Video released Tuesday shows officers responding to a report of someone pointing a gun from the window of an Arizona hotel, but a judge barred the release of additional footage showing an officer later shooting and killing an unarmed man at the scene.

The shaky body-camera footage was taken during a Jan. 18 call that ended with Officer Philip Brailsford fatally shooting Daniel Shaver of Granbury, Texas, in Mesa.

Brailsford has pleaded not guilty to a charge of second-degree murder in Shaver's death.

Maricopa County Superior Court Judge Sam Myers ordered portions of the video released after Shaver's widow and news organizations called for it to be unsealed as a way to hold police accountable and serve the public interest.

Get Breaking News Delivered to Your Inbox

However, the order bars the public release of the face-to-face encounter between officers and Shaver until Brailsford's case is resolved.

Investigators said in police records and in court that the video shows Shaver on the ground outside his room as he is ordered to crawl toward officers and tearfully pleads with them not to kill him. Officers at the scene say they believed Shaver was reaching for a gun.

No weapons were recovered from Shaver's body. Investigators found two pellet rifles in the hotel room that were later determined to be part of his pest-control job.

Brailsford was later fired for violations of departmental policies.

The video shows Brailsford and other officers getting into a hotel elevator, listening to a sergeant voice a plan for getting Shaver and a woman out of the room, and waiting for several minutes as their calls for the pair to come out went unanswered.

"Listen to my instructions or it's going to become very uncomfortable for you," one of the officers shouted.

Officers took cover in doorways as they waited for a response. Brailsford and another rifle-carrying officer at one point crouched down on their knees as they pointed their guns down the hallway.

The edited version of Brailsford's video ends when someone walks out of the room.

Video taken by another officer ends with an upset woman being taken from the hotel to wait on a bench.

Brailsford, prosecutors and Shaver's parents have argued that the video shouldn't be released to protect Brailsford's right to a fair trial.

Police shooting videos have become the focal point of protests around the country. Chicago officials fought for more than a year to withhold a video showing a teenager getting shot by a police officer, and the court-ordered release of the footage prompted heated protests against Mayor Rahm Emanuel.