A state judge freed a previously deported Uber driver accused of rape on light bail even after a prosecutor insisted that federal immigration agents were drafting a detainer and asked for high bond to hold him, according to a court recording obtained by the Herald.

The stunning tape of Tuesday’s hearing reveals Newton District Court Judge Mary Beth Heffernan cutting the arguments short before a defense attorney could even counter the prosecution’s $100,000 bail and GPS-monitoring demand, interjecting, “Twenty-five hundred dollars cash.”

Luis Baez — now being sought by immigration authorities who tell the Herald he’s dropped out of sight — is accused of raping an inebriated Boston College student who had hailed his Uber car Sept. 29. Immigration and Customs Enforcement officials said they made attempts to find Baez, but have been unsuccessful.

Middlesex Assistant District Attorney Raquel Frisardi told the judge Baez took the student to a parking lot and other sites and raped her three times even as she was vomiting and fighting back. He then dropped her at Boston College, where she reported she had been raped.

Police tracked Baez through the Uber app data. They determined with the help of Boston gang cops, who recognized his picture, that he had been using a false name — Pedro Valentin — on his Uber account.

The prosecutor told Heffernan that Baez was “somebody known to the Boston police gang unit as having previous involvement in the Mozart Street Gang, someone who had been previously prosecuted and in fact previously deported,” according to a court recording of the 17-minute arraignment Tuesday afternoon.

Heffernan, a Gov. Deval Patrick appointee and former public safety secretary in his administration, pressed for more information about the prior deportation, and Frisardi, the prosecutor, told her federal authorities had confirmed Baez’s immigration history and status.

“I’m informed they will be seeking a detainer against him as well,” Frisardi told the judge, asking Heffernan for $100,000 bail, GPS monitoring, house arrest and an order for Baez to stay away from the victim and witnesses.

Frisardi added that Baez had resisted “for many hours” being booked by Newton police when he was arrested on the three rape charges.

Heffernan abruptly set the bail at $2,500, set a follow-on court date for June 21 and asked, “Is he going to make the bail today?”

Someone in the courtroom called out, “Yes.”

“Can you take bail downstairs?” Heffernan asked a court employee. “Sometimes they won’t, they make them go back out to the House of Correction at 4 o’clock.”

Heffernan was appointed to the bench in January 2013 after her resignation from the Patrick administration amid controversy over her department’s hiring of a Democratic fundraiser with a checkered driving record to serve as highway safety director.

A court spokeswoman declined comment on Heffernan’s behalf.

Baez posted bail before immigration agents could file a detainer request to have him held. ICE officials have said they fear Baez is in the wind and they have not been able to find him since he was bailed out.

Baez’s defense attorney, John Benzan, said his client has denied the charges and drove the woman for only 22 minutes — from 7:51 p.m. to 8:13 p.m. — arguing, “It’s not even feasible or possible to do all of what this woman alleges in the 22 minutes.”

Baez was brought to the U.S. when he was 3 years old and due to some legal problems couldn’t obtain citizenship like his mother, father and siblings did, Benzan said. Baez has two children and one more on the way, Benzan said, and has known about the allegations since September.

“With respect to bail and whether he is going to run,” Benzan said, “every day of eight months (since the alleged rape), he was presented with an opportunity to run, knowing that some young woman from Boston College had accused him of rape, and he didn’t go.”

“Thank you,” Heffernan said, indicating she had heard enough, before issuing her low bail.