For 20 years, Ray Kelly and Bill Bratton have been the brightest stars of American policing.

They've also been rivals.

They usually mute their criticisms of each other. But recently Kelly has upped his game. Whether this is part of publicizing his just-published memoir or a 2017 mayoral run is unclear.

Their rivalry dates to the early 1990s, when Bratton headed the NYC Transit Police and Kelly the NYPD under Mayor David Dinkins. The rift grew after Rudy Giuliani became mayor in 1994 and appointed Bratton to replace Kelly. Kelly never forgave Bratton for taking the job Kelly felt he deserved.

Bratton dismissed community policing, one of Kelly's signature initiatives, as "social work." And he also upset Kelly after he launched broken-windows policing. Kelly responded by predicting a public "backlash" and warning that crime would increase. Eight years later, Kelly returned as commissioner under Mayor Michael Bloomberg. When Bratton, then the chief of the Los Angeles Police Department, came to NYC for a visit, Kelly refused to take his call.

Then came the fifth anniversary of 9/11. To commemorate it, the Manhattan Institute organized an anti-terrorism conference. With the NYPD, the institute invited law enforcement figures including Bratton; his protégé John Timoney, then police chief of Miami; and John Miller, Bratton's former counterterrorism head in Los Angeles. Learning of this, Kelly pulled the NYPD out of the event and held a rival conference the same day at Police Plaza.

Fast-forward to 2014, when Bratton returned as NYPD commissioner under Mayor Bill de Blasio. One of his criticisms was that Kelly overused stop-and-frisk, saying it alienated African-Americans and created low morale in the NYPD.

During a recent radio interview to promote his book, Kelly struck back. He said that as LAPD chief, Bratton used stop-and-frisk on a per capita basis more than Kelly had in NYC.

Some see Kelly's attacks on Bratton, and by implication de Blasio, as the beginning of a mayoral campaign. Kelly considered running for mayor in 2008, but scuttled his plan when Bloomberg decided to run for a third term. Bratton, too, considered running for mayor. This was in 1997, a year after Giuliani fired him. He decided not to run, concluding he couldn't win.