It came down to the wire, but Quantico has scored a last-minute 13-episode third-season renewal from ABC less than 24 hours before the network’s upfront presentation. When it comes back, the terrorism drama starring Priyanka Chopra will have a new showrunner at the helm as creator/executive producer Josh Safran is stepping down from the role. Safran will stay on as a consultant for Season 3. Search is underway for his replacement.

Primetime-Panic Your Complete Guide to Pilots and Straight-to-Series orders See All

Production on the series will remain in New York. There had been chatter that the drama’s writers room would move to Los Angeles but that will be decided after a new showrunner is in place.

Quantico, from ABC Studios and producer Mark Gordon, was a breakout when it debuted in fall 2015, breaking delayed viewing lift records. But with its dense narrative and heavy serialization, the series started to lose momentum in the second half of its first season and couldn’t stop the ratings declines with a season 2 reboot. In its second season, Quantico has averaged a 1.3 adults 18-49 (Live+7).

Still, the series has a global star, Chopra, as its lead, and has been a strong international seller for ABC Studios, which helped for the renewal.