Bristol County Assistant District Attorney Patrick Bomberg said Hernandez's lawyers told him in an initial meeting at the North Attleborough police station that their client would turn the phone over if authorities obtained a warrant for it.
Bomberg said a warrant was issued and a lawyer for the ex-player reviewed it and arranged to turn over the phone to a Massachusetts state trooper in the lobby of the firm's office building in Boston.
"There's never any objection," he testified in Fall River Superior Court.
The defence now maintains the phone was turned over under a "false claim of legal authority" and is seeking to have evidence from it thrown out. In prior court filings, they have said the warrant did not authorize the phone's seizure from Hernandez's attorneys or from their law office and that the seizure was illegal.
In a separate move Tuesday, the defence formally sought a change of venue for the trial, saying the "relentless avalanche of pretrial publicity" has had a "devastating effect" on the jury pool. The motion cited a professional poll they commissioned that found 7 in 10 adults in Bristol County believe Hernandez is either definitely or probably guilty.
Hernandez has pleaded not guilty in the 2013 shooting death of Odin Lloyd. The semi-professional football player from Boston had been dating the sister of Hernandez's fiancee.
The phone at the centre of the legal wrangling allegedly contains text messages exchanged between Hernandez and Lloyd about getting together not long before Lloyd was killed.
Hernandez declined to allow authorities to search the phone at the police department a few hours after Lloyd's body was found, but his attorneys said he would maintain its contents and turn it over if a warrant was produced, Bomberg testified.
Bomberg said he learned that Hernandez no longer had the phone and that he had given it to his lawyers only when the prosecutor called to inform them that search warrants were being executed at the former Patriot's home.
The defence has said in court filings that authorities learned where the phone was after Hernandez told them during what they call an unlawful interrogation at his house.
Hernandez, 24, attended Tuesday's hearing but did not address the court. The proceeding is to continue Wednesday.
Hernandez also is charged in another case with the murder of two Boston men in 2012 after a brief encounter at a nightclub. He has pleaded not guilty in that case too.
In seeking a change of venue, the defence on Tuesday suggested a county outside the Boston media market and named Hamden or Worcester County as possibilities.Suggest a correction