Bank burglars reminded New York's top police official of a Hollywood movie as they pulled off two nighttime heists, snatching about $5 million in cash, diamonds, jewelry, coins and baseball cards from safe deposit boxes before they were caught, authorities said Tuesday as they announced the arrest of three men.

New York Police Department Commissioner William J. Bratton credited "painstaking persistence" by investigators left with few clues as they looked into a string of recent bank burglaries. He said they learned that plywood used by the burglars was bought at a nearby Home Depot and that torches from a Brooklyn welder were used to poke into bank vaults.

"These heists resembled scenes from the movie 'Heat' — the work of a crew that was well organized, meticulous, and elusive to law enforcement," Bratton said.

Evidence in the case will include surveillance footage of the men as they prepared for and carried out the burglaries, as well as video surveillance of two of the men buying supplies used in one of the burglaries, authorities said.

U.S. Attorney Preet Bharara said the burglars used the darkness of night in an April attack against an HSBC Bank in Brooklyn and a May break-in at the Maspeth Federal Savings Bank in Queens to blowtorch their way through roofs and into the vaults of the banks.

"Through their brazen bank heists, the defendants allegedly stole not just people's money, but their memories too, leaving in their destructive wake gaping holes and looted vaults," Bharara said.

Bharara credited the NYPD and FBI for teaming up on the arrests of Michael Mazzara, 44, Charles Kerrigan, 40, and Anthony Mascuzzio, 36, all of Brooklyn. They were charged with conspiracy to commit bank burglary and bank burglary.

Mazzara's attorney, Sam Talkin, said Mazzara denies the charges and maintains his innocence. A lawyer for Kerrigan did not immediately return a message seeking comment. It was not immediately clear who would represent Mascuzzio when all three men appear in Manhattan federal court Tuesday.

On a bank roof in Queens, the burglars left behind empty safe deposit boxes, grinding wheels and a fuel tank for a cutting torch. Near a hole in the roof was a black plywood structure that the burglars apparently built to shield themselves from view.

In Brooklyn, the burglars cut interior vault alarm wires along with phone wires a block away, authorities said. Investigators said they relied in part on telephone and financial records, cellphone data and a confidential source to build their case.