Josh Lewin is leaving the Mets for the San Diego Padres, The Post has learned.

After being Howie Rose’s game-calling partner on the Mets the past seven years, Lewin is taking a newly created position on Padres radio in which he will primarily be the pre- and postgame host, according to sources. Lewin has family roots in San Diego and was the longtime voice of the Chargers before they moved to Los Angeles.

Lewin’s new Padres role is similar to what Wayne Randazzo had on WOR-710 AM with the Mets. Randazzo, the pre- and postgame host on the Mets’ WOR games, would fill in on play-by-play when the main guys were off.

The Mets’ broadcast will move from WOR to WCBS-880 AM next season.

Who will replace Lewin on Mets games is still to be determined. Randazzo is a candidate, though Entercom and the Mets could open it up to a national search.

Entercom executive Mark Chernoff, who also runs WFAN, is in charge of the hiring and is going about it in methodical fashion, according to sources. Chernoff first verbally agreed to terms with Rose before finalizing Lewin’s situation. The station Lewin is leaving for, San Diego’s 97.3 FM, is also owned by Entercom, which allowed Chernoff to have a hand in helping Lewin land with the Padres.

If the Padres’ job had not arisen for Lewin, it is not entirely clear if he would have been back with the Mets or not. With Lewin’s desire to be out West full time, it became a bit of a moot point.

Lewin, 50, was the voice of the Chargers for a dozen years. He currently does UCLA basketball and football. When asked by The Post about the details of his exact new job, Lewin declined comment, saying he had to stand by what he had previously said.

“Earlier this week, I removed myself from consideration as part of the Mets radio team,” Lewin told The Post on Saturday. “Instead I will be accepting an offer away from New York, with details coming as soon as the contracts get signed.”

Sources said that Lewin will not be replacing anyone. The Padres’ lead play-by-player, Ted Leitner, is akin to what John Sterling is with the Yankees, having done games there since 1980. His partner is Jesse Agler. Both are remaining on games.

Now, with the Lewin situation basically resolved — except apparently for officially signed contracts — Chernoff will figure out who will partner with Rose.

Ed Coleman, the longtime Mets reporter for FAN — which, like CBS, is owned by Entercom — is in the mix as a possible pre- and postgame host, though Coleman has thought about retiring.