The two NYPD patrolmen accused of raping a drunken woman made a bogus 911 call so they could be sent back to the victim’s East Village apartment, a senior prosecutor said.

The call was made from a pay phone at the corner of East 13th Street and First Avenue, where Officers Kenneth Moreno and Franklin Mata had been summoned to handle a traffic accident in the early morning on Dec. 7.

It proves the cops coldly plotted the sexual assault of the incapacitated woman, prosecutors say.

The caller said his name was John Edward and complained about a drunken homeless man, saying the man was at 512 E. 13th St. — two doors down from where the woman lived.

The cops had already been in the woman’s apartment twice over a 46-minute period and needed to concoct an excuse for a third visit, according to the prosecutor at the Manhattan District Attorney’s Office.

It was during the third visit that Moreno allegedly raped the woman while she was lying face down on her bed and after she had vomited several times.

Mata, his partner, “assisted in the act,” according to charges filed against the two.

The phone-call ploy worked, the prosecutor said.

A police dispatcher, responding to the complaint, sent the patrolmen to 512 E. 13th St. at about 2:45 a.m. They walked into the building’s foyer and out again quickly.

They then entered the woman’s building at 2:59 a.m., using a key that they had taken from her during their second visit to the apartment, said sources involved in the case.

Surveillance video captured them shielding their faces from a camera they spotted on the second trip. The two didn’t realize a separate camera caught their attempts to conceal their identities.

The 9th Precinct officers remained in the apartment for 34 minutes before leaving, according to the charges.

Their actions that night and during the following days — when they allegedly faked logbook entries — prompted prosecutors to build cases against both officers and eventually to reject a purported offer by Mata to testify against his partner.

Moreno, 41, and Mata, 27, were indicted Tuesday, charged with rape, burglary and official misconduct. Moreno faces drug charges after heroin was allegedly found in his station-house locker. The two were suspended by the NYPD.

Police Commissioner Ray Kelly called the case a “shocking aberration.”

Both pleaded not guilty. They told investigators the sex was consensual. Mata’s lawyer denied his client offered to testify against his partner.

The investigation, which lasted four months, was aided by a secret audiotape recording that the woman made shortly after the alleged rape.

Wired with a hidden device, she arranged a meeting with Moreno, who apologized to her for his actions that night and conceded that she had been extremely intoxicated, sources said.

The probe involved numerous forensic tests at the woman’s apartment and interviews with virtually everyone who came in contact with the cops and her, including cabby Kofi Owusu, who took her home, residents in her building, and the two drivers involved in the accident.

“I remember everything that happened that night,” Owusu told The Post, declining to elaborate.

Investigators interviewed the bar staff at Southpaw, a large music club in Park Slope, Brooklyn, where the woman had begun her night partying with co-workers.

The woman, 27, is a high-level executive with a well-known firm. After the alleged attack, she moved out of the city.

Moreno is a 17-year NYPD veteran. Mata was on the job for two years.

brad.hamilton@nypost.com