Members of rival Brooklyn gangs held a truce long enough to build a lucrative drug and gun trafficking operation before law enforcement authorities dismantled it by arresting seven people and seizing more than 20 weapons, officials said Friday.

Crips and Bloods were working hand in hand to sell guns and drugs in Crown Heights until a yearlong undercover operation exposed their criminal coalition, officials said.

“They set aside rivalries to work together, united not by loyalty but by greed and a willingness to flood one of our neighborhoods with crack cocaine and guns,” Police Commissioner Jessica Tisch said. “Now, their reign of terror is coming to an end.”

Officials said the 12-month crackdown involved wiretaps, personal and electronic surveillance and undercover officers who boug

See Full Page