PARTING OF THE WAYS: Mike Pettine (right), who felt it was time to get out of Rex Ryan’s shadow, will be the Bills defensive coordinator next season, according to multiple reports. Photo: Jeff Zelevansky

Next year’s games between the Jets and Bills just got a lot more interesting.

Mike Pettine, the Jets defensive coordinator for the past four years, accepted the same position with the Bills yesterday, according to multiple reports.

The Jets allowed Pettine’s contract to expire as the two sides came to a mutual agreement to part ways. Pettine felt it was time for him to get out from under coach Rex Ryan’s shadow and prove he could call his own defense. Ryan and Pettine clashed last year over play-calling, according to a source.

Pettine joins new coach Doug Marrone in Buffalo. The Bills also received permission from the Jets to interview assistant defensive backs coach Jim O’Neil.

Defensive backs coach Dennis Thurman will be promoted to replace Pettine, according to a source.