NEW YORK — CBS News correspondent John Miller has bounced between journalism and law enforcement for years, and now he’s headed back to work for incoming New York City Police Commissioner William Bratton.

CBS confirmed Miller’s imminent exit on Thursday.

Miller’s extensive law enforcement contacts made him valuable at CBS, notably for his reporting this year on the Boston Marathon bombing. But his recent “60 Minutes” story on the National Security Agency received criticism for being one-sided in favor of the government agency. Miller and his boss, CBS News President David Rhodes, defended the story, and Rhodes said Thursday it had nothing to do with Miller’s exit.

The timing was awkward for CBS, when news reports suggesting that Miller would rejoin Bratton began appearing only days after the “60 Minutes” report.

Miller talked about the move to WCBS-TV, although he did not make clear exactly what he will do for Bratton.

Miller served as deputy commissioner and chief spokesman for the New York City police during Bratton’s first tenure as police commissioner in the 1990s. He followed Bratton to Los Angeles, and was head of the LAPD’s counterterrorism and criminal intelligence bureau.

“He clearly has a commitment to public service and has a long-running relationship with the new commissioner,” Rhodes said. “It’s hard to stand in his way.”

The New York Police Department had no comment Thursday. Mayor-elect Bill de Blasio’s transition team didn’t immediately respond to a request for comment.

Miller clearly burned no bridges at CBS News. “John will always have a home at CBS News,” spokeswoman Sonya McNair said on Thursday.