A.J. Cook, Joe Mantegna A.J. Cook, Joe Mantegna

It wasn't hard for the writers of Criminal Minds to find inspiration for the show's Season 6 finale.

It's been a year of surprising cast shakeups and general uncertainty for the show, and Wednesday's finale (9/8c, CBS) speaks to that. "The writers cleverly decided to let the cliff-hanger aspects of the BAU team mirror what's going on with [us]," star Joe Mantegna tells TVGuide.com. "The uncertainties and decisions and problems and solutions directly mirror what's happening in real life."

Finale Preview: Get scoop on 39 season-enders

"It's about our team and the financial cost of crime-fighting," executive producer Erica Messer adds. "Bad guys seem to have endless funds but, as in real life, there are budget cuts in the government and the team is in jeopardy of being split up."

Budget cuts forced the show to write out series veteran A.J. Cook early in the season. Her character, Jennifer "JJ" Jareau, returned for one episode when fellow cast member Paget Brewster filmed her character's swan song. However, Cook has now signed a deal to return full time next season, and will be reintroduced in the finale. (Brewster, who shot a pilot that NBC has passed on, has an option to return if she chooses.)

The actors' real emotions played out on-screen when Cook left the show, and Mantegna says the same is true of her return. "It was one of those things where none of us quite understood why it happened in the first place," he says. "If you don't own the ball park, you can't make the decisions as to what goes on inside it. But now, the bottom line is we're all thrilled. She was always an integral part of the show. ... Hopefully this will re-energize us in a lot of ways."

A.J. Cook to return to Criminal Minds

Indeed, Messer hopes to build a lot of story around JJ in the new season. "JJ has grown a lot since we last saw her in September," Messer says. "She's going to have a stronger voice than before and will have insights we don't have."The actual case in the finale involves the investigation of a human trafficking ring. "I was inspired by a quote that I used in the episode," Messer says. "English novelist Thomas Hardy wrote, 'And yet for every bad there is a worse.' It's sad but true... [and]  the case proves the thought. It's not just kidnapping, it's domestic trafficking. But it isn't just trafficking — when the victims are used up, they're killed for sport."Unlike recent finales, the episode isn't necessarily focused on a certain member of the team, Mantegna says. "It's  like the Beatles — some like George some like Ringo, but at the end of the day you want to listen to the music in the band," Mantegna says. "Our strength is in the ensemble, so it's fitting that the last episode of the season should be something that encompasses that. It's not a one-man band."

Shemar Moore re-ups Criminal Minds deal

But will the team remain intact come September? Cast member Shemar Moore just re-upped his contract but Thomas Gibson remains in negotiations. Perhaps it's just another example of art imitating life."The cliff-hanger isn't someone blowing up in an SUV, but the drama of what's going to happen to our team," Messer says. "The goal was to show how much the world needs our heroes and how important it is that we keep the team together. Our characters are the human side of our show — the light to the darkness we're surrounded by. They deserve to be explored further."Criminal Minds' Season 6 finale airs Wednesday at 9/8c on CBS.