Amazon's Echo devices. James Cook/BI

Amazon has handed Alexa recording data over to police in an Arkansas murder case after the defendant gave his permission, according to Associated Press.

The tech company had been fighting efforts from US police to obtain recordings that may have been made by an Amazon Echo speaker in the vicinity of the murder.

According to AP, James Bates pleaded not guilty to first-degree murder in the death of Victor Collins, who was found floating face-up in a hot tub at Bates' house. In a filing last week, Bates said Amazon could share the information. Amazon said it gave the data to police on Friday.

Amazon's Echo devices respond to particular keywords and record audio from a few seconds before, during and after "hearing" one of the words. They will often record accidentally in response to non-keywords. It's possible Bates' device recorded what happened in the run-up to Collins' death.

Amazon had cited consumer privacy rights in refusing to hand over the data, in a court filing last week. It had argued that the Benton County prosecutors hadn't established that the investigation was more important than its customers' privacy rights. A hearing had been scheduled for Wednesday to determine whether any Echo data would be relevant.