An NYPD officer broke into a Bronx apartment last month, wheeled out a safe in a shopping cart, and repeatedly accessed restricted police databases before and after the alleged burglary, according to police and court records.

Officer Luis Triunfel, 33, pleaded not guilty Tuesday to 17 counts, including second-degree burglary, third-degree grand larceny, tampering with physical evidence and 14 counts of computer trespass. He was released on his own recognizance, court records show.

Triunfel had been on the force for two years and was assigned to the 28th Precinct in Harlem when he entered an acquaintance's apartment on Boynton Avenue in the Bronx around midnight on Aug. 31, according to an NYPD Internal Affairs Bureau investigator's criminal complaint. Investigators allege he removed a shopping cart holding a black metal safe with a key lock.

The complaint says the safe contained approximately $9,500 in cash, $38,500 in gold jewelry and personal documents, including a passport, Social Security card and permanent resident card. The property was worth more than $50,000 in total, according to the complaint.

Triunfel returned to the building later that day and disabled its video surveillance system, erasing footage that had captured the burglary, according to the complaint.

The day before the alleged burglary, he ran a license plate reader search on the acquaintance's vehicle. Over the following two weeks, Triunfel is accused of repeatedly accessing NYPD systems from his department-issued cellphone while off duty, according to the complaint.

That included opening the police complaint report for the burglary on Sept. 3 and accessing it four more times on Sept. 7. On Sept. 14, investigators allege, Triunfel searched the NYPD's Domain Awareness System for his own name.

Triunfel was not assigned to the burglary case or investigation, and none of the searches fell within his official duties, the complaint said. Department rules restrict police computer systems to official business.

Triunfel's attorney did not respond to messages seeking comment.