[Warning: The below contains MAJOR spoilers for the series finale of God Friended Me, "The Mountain."]

Miles' (Brandon Micheal Hall) journey came to an end in the final two episodes of God Friended Me on Sunday.

His last friend suggestion was quite fitting: his sister Ali (Javicia Leslie), on the eve of her surgery. And when he was faced with possibly losing her, he found himself in a church, asking for help. It was then his father Arthur (Joe Morton) called, and when he returned to the hospital, it was to good news. Ali was going to make a full recovery.

The series ended with a montage wrapping up the characters' stories — Miles and Cara (Violett Beane) got back together after a few months as friends, while Rakesh (Suraj Sharma) and Jaya (Shazi Raja) reunited and got engaged. Ali joined the seminary.

And in the final scene, Miles followed a message from the God Account to the Annapurna Himalayas, where he was set to get the answers he'd been eager for all along — from a "she" who has been waiting for him.

Here, executive producers Steven Lilien and Bryan Wynbrandt break down the series finale and reveal what would have come next.

How did the cancellation change your original plan for the Season 2 and series finales?

Steven Lilien: We had a version of the Season 2 finale that, 90 percent of it is there at its core. We always knew the whole season would be driving towards Miles and how far we could push him on his journey of rediscovering a version of faith. And we always knew from the beginning of the season from when we pitched it to CBS and Warner Bros. that we were going to do a whole back half arc of Ali having cancer and she was going to be our final friend suggestion. From that standpoint, everything stayed the same. Obviously, we did have a version that would launch us into Season 3 that is a little bit different how we decided to end it, but it didn't change the spirit of what we were going for.

Speaking of Ali as the last friend suggestion, was it always the plan to have her help Miles in his struggle with faith?

Bryan Wynbrandt: It wasn't necessarily the plan. It was always the plan that she would be the last friend suggestion that would lead him towards the next chapter of his journey, and so when we realized the show wouldn't be coming back, the direction we took Miles was a much more accelerated version of what we were going to do at the end of Season 2. It just ended up working out that way that Ali was the final friend suggestion that got him where he needed to go.

Obviously the big question of the series is who's behind the God Account. What went into the decision for the ending we got?

Wynbrandt: The original script that Steven and I wrote had the mountaintop scene. That was actually filmed for the pilot. Obviously we didn't go out of our way to film on a mountaintop for the last episode, and in fact, we had to cut short some of our filming for the last episode. So when we came up with the plan, we wanted to revisit that mountaintop footage because in a lot of ways, that was always our ideal ending: Miles on that mountaintop and heading to see the person and/or deity behind the God Account.

For us, the beauty of the show is the answer really lies in the beholder, and that's the thing with religion too, is what you take from it. The spirit of the ending was always to put Miles in that position and put the audience in his point of view. Who is that person who is waiting for him? Is it God? Is it his mother? That was the journey we were going for, and we were able to get there sooner than we had hoped for.

Lilien: And on an emotional level, the mountaintop represents his journey. He started the series someone who is very much cynical about faith and people a little bit, and his reaction, the look on his face at the end, completes that arc, that he's rediscovered his own faith and not so much entirely in religion but more in humanity. He feels at peace with this journey, which was really important to us.

After the God Account brought Miles and Arthur closer together, it reunited a father and son in the penultimate episode.

Lilien: We set up Alphonse midway through the season, and we always knew that, much like in the first season, it was about reuniting these three friends in Pria, Simon, and Henry. That Season 2, at its spine, once we introduced Alphonse and started to lay the ground for Corey, that it would be about reuniting a father and son, which is obviously incredibly important to Miles and Arthur.

That's why we decided very early on to make the connection that Alphonse had a very personal connection to Arthur and to the Finers. They were all invested much more than just a friend suggestion.

Miles and Cara do get back together after a few months. But can you talk about playing out that relationship this season and having them take a break? There were very real issues.

Wynbrandt: It was important for us to explore their relationship, like you said, and see how those real issues came to the forefront with an incredibly pervasive element in their life, the God Account, which ultimately took the legs out from under Cara when it broke up her family and then put her in a position of how does she feel about the God Account and how does it affect her relationship with Miles? They ultimately make a decision to take a break, and sometimes people make those decisions and one person in that relationship is able to move forward, and the other isn't.

For Miles, he started to really resent the fact that he made all these sacrifices for the God Account and wasn't seeing Ali being helped by it ultimately, and felt that losing Cara wasn't something he would've chosen in any other circumstance. It was really important to see that, while the God Account was doing great things for Miles, it was also taking things away from him. That's the prophet's journey. You can't really walk that path and be able to have love and a perfect life and still be this man who's on this mission to help all these people.

Early on in the season with Gideon, played really wonderfully by T.R. Knight, he really set down the standard for Miles saying that the God Account would make him choose, and it ultimately did. But we ultimately felt had the series gone on multiple more seasons or even one more, eventually Miles and Cara would end up together because that always was, in our hearts, what we wanted for them. We just obviously needed to accelerate that for the ending because it would've been disappointing if they didn't end up together in the end.

Rakesh and Jaya also get back together. What would we have seen with that relationship?

Lilien: Shazi is such a terrific actress. She brings so much life into that role, and we love them together and they always pop so much. We introduced her in the finale with the idea they were going to try to restart things in Season 3. We always saw that as this great love story, that they ultimately would end up together and have a family and be these soulmates.

If you go back to the pilot, you have someone in Rakesh who basically said he doesn't believe in soulmates, that there's one person for you, and then he met Jaya in the pilot. We always imagined from day one that that would be his journey. Starting him in that place and ending with, if it was 20 years from now, they'd have a family together.

Wynbrandt: We even discussed in Season 3 them finding out that she was pregnant. We were going to have some fun stuff in Season 3 for the two of them.

There were moments for a lot of the relationships in these last two episodes — Miles/Cara, Miles/Rakesh, Miles/Arthur, Miles/Ali, Arthur/Ali, Ali/Trish, Cara/Ali. Which ones did you want to make sure you included and were there any emotional scenes you wish you'd been able to include?

Wynbrandt: We had a scene that we were unable to film where we were going to see Miles as a young child praying in the church for his mother, something that he told the story of in the pilot to Cara. We were going to start the episode in the past with him as a young kid, praying, and Arthur there with him, and then we were going to flash to the present, and it was going to be this arc of getting him back into the church at the end and it was going to round out the arc even more.

We had cast this young man, an 8-year-old kid, to play Miles, and he was so great, and his audition was fantastic, but because of what happened with the situation in New York and us having to pull production — that was the day we decided to go down in production and we were never were able to film that scene. That was one I really was looking forward to.

See Also Where Are Your Favorite TV Shows Filmed? (PHOTOS) L.A. is still the entertainment capital of the world, but a surprising number of TV shows film outside of California, too.

Miguel returned, and we got that great montage of friend suggestions at the end. Are there any you wish you'd been able to revisit?

Lilien: Oh my God, yeah. That ending with all the friend suggestions is sort of like a love letter to the fans. There's so many we brought back over the course of 42 episodes that we loved. You had Ray, and you had Fliss and John Dove and all these characters that really left an imprint on us and the fans.

The idea is if we went into Season 3, just like we did with Season 2, to bring people back and see how their lives have been changed by Miles. And [to] see how maybe they start to pay it forward, which is something we were going to get into in Season 3 if we had that opportunity.