Jurors in Bill Cosby's sexual-assault trial in Montgomery County will be allowed to hear a secretly taped 2005 phone call between the entertainer and his accuser's mother that took place nearly a year after the alleged attack.

In a ruling Friday, Judge Steven T. O'Neill sidestepped defense arguments that the recording should be kept out of court because Andrea Constand's mother violated Pennsylvania's wiretap laws by taping their conversation without Cosby's consent.

The judge noted that as Cosby was in California when he placed the call to the Constands' home in Ontario, Pennsylvania law had no bearing on whether it was legally recorded.

"The phone call at issue was placed from California to Canada," O'Neill wrote. "Pennsylvania has no interest in, or control over, the action of a Canadian citizen in her home in Canada."

The ruling - in what is expected to be the first of many evidentiary fights as Cosby's case heads toward trial in June - came as a setback to the 79-year-old entertainer, who has denied allegations that he drugged and sexually assaulted Andrea Constand at his home in 2004 and has maintained their encounter was consensual.

The judge's reasoning also ran counter to that of former Montgomery County District Attorney Bruce L. Castor Jr., who cited the "illegally obtained" recording as one of his reasons for declining to prosecute Cosby when Constand first came forward more than a decade ago.

In it, Cosby offered to pay for graduate school for Constand and attempted to set up a face-to-face meeting with her and her mother, shortly after Constand had contacted police in Canada but two days before she first brought her allegations to Cheltenham authorities.

The recording was one of two phone conversations Constand's mother, Gianna, had with Cosby in January 2005. The first call, which was not recorded, included what Cosby's attorneys have acknowledged was a lengthy conversation in which their client discussed the alleged encounter. Cosby apologized, but he later told police he did so only to pacify Gianna Constand.

The next day, Gianna Constand recorded the follow-up call with what her daughter has said was a micro-recorder from Radio Shack.

Cosby's attorneys said that it could not be used as evidence because Pennsylvania's law requires two-party consent. Canadian law, however, allows taping if only one party is aware that a recording is being made.

The entertainer's defense team did not immediately respond to requests for comment on the ruling Friday.

Montgomery County District Attorney Kevin R. Steele welcomed the judge's decision.

"The judge's ruling applying the relevant law will allow us to put important evidence before a jury," he said in a statement. "We remain ready to present our case in court."

Cosby's attorneys also are fighting to keep proposed testimony from 13 other accusers and deposition testimony he gave in Constand's 2005 civil suit against him out of his trial, which is scheduled to begin June 5.