Fox has ordered one last season of “Fringe,” its Friday drama from J.J. Abrams.

The show’s future had been in some doubt, since the ratings aren’t great and Fox doesn’t own the show – it’s produced by Warner Bros. TV.

But the outlook got brighter for “Fringe” once Fox canceled “Terra Nova,” plus the network, and the star of “House” finally decided to put that show out of its misery.

And, presumably, Fox got the last, 13-episode season at a good price. At the end of this season, Warner Bros. will have about 87 episodes of the paranormal drama.

Ideally, Warner Bros. needed – well look at that -- 13 more episodes, in order to fill in the 100-ish-episode library that’s considered ideal when selling a show in off-network syndication.

“All of us at Bad Robot are forever indebted to our viewers and the amazingly supportive FOX network for allowing the adventures of Fringe Division to not only continue, but to resolve in a way that perfectly fits the show,” Abrams said in Thursday’s announcement.

Fox programming chief Kevin Reilly, meanwhile, served up the traditional “bittersweet” quote:

“The amazing work the producers, writers and the incredibly talented cast and crew have delivered the last four seasons has literally been out of this world. Although the end is bittersweet, it’s going to be a very exciting final chapter.”