[Warning: The following contains spoilers from Monday's Jane the Virgin. Read at your own risk!]

Jane the Virgin pulled off its most devastating twist yet when undetected side effects from Michael's (Brett Dier) gunshot wound caused him to collapse and die in Monday's episode. The move is not only a shock to fans who were sure that Michael had survived his near-fatal attack at the end of last season, but proves why Jane is one of the smartest shows on TV.

In the moment, the idea of Michael dying seemed like an impossibility. He survived the gunshot and the subsequent surgery at the beginning of the season. He and Jane (Gina Rodriguez) were settling into their married life together. There was even talk of moving up their timeline to have another kid. How could something as tragic as his death ruin that?

Adding to the shock of the moment is the fact it occurred in the middle of the season and none of the teasers for Monday's episode warned fans that something of this magnitude would be happening. Typical television programming predicts that major characters must die in season or mid-season finales (or if you're Game of Thrones, penultimate episodes).

Brett Dier and Gina Rodrgiez, <em>Jane the Virgin</em>Brett Dier and Gina Rodrgiez, Jane the Virgin

The timing is just a small part of what allowed Jane the Virgin to pull off this crushing twist though. In the moment it does feel shocking, but eventually it starts to dawn that the clues were there all along. First, we've been told three separate times that Michael would love Jane until his dying breath: once in episode 10 of Season 1 and then twice since the Season 2 finale when he was shot. We knew this was coming but chose to believe it would be a lot further down the line than it was.

Secondly, Michael failed the physical that would have allowed him to return to active duty on the police force. There was a lack of investigation or explanation of what would keep him from being able to physically perform when he looked to be 100 percent. Was there something in the physical that would have been an indicator that his heart was under duress? The best kind of twists are not the ones you can call ahead of time, but the ones that make perfect sense in hindsight once they unfold.

Jane the Virgin Mega Buzz: Rafael's troubles aren't over yet

Now comes the hard part. It took nearly two seasons for Jane to realize Michael was her soulmate. Creator Jennie Snyder Urman and her writing team managed to tango with one of the best-written love triangles on television and then craft a story that would bring every fan on board Jane and Michael's relationship. Now those fans, along with Jane and the Villanueva family, must morn the loss of the man we thought was Jane's soulmate.

Based on the preview for next week's episode, which takes place three years in the future after the time jump that closed out this week's episode, it looks like Gina Rodriguez is throwing down yet another award-worthy performance. Jane the Virgin is navigating from the lighthearted, delightful, jovial fair it's been peddling into more serious drama. The show has always managed an ebb and flow between genres, but the transition here will likely once again prove that Jane the Virgin is one of the most intelligent shows on television and one that can juggle belly-laugh inducing comedy and heart-wrenching drama with the same deft touch and sincerity.

Jane the Virgin boss discusses the end of the love triangle, Jane losing her virginity and more

It's a painful loss to see Michael go (though Urman promised The Hollywood Reporter that Dier will return for flashbacks and other Jane magic — bless you fantasy sequences!), but it's a move that bravely pushes the show forward. It will undeniably change Jane as a character, both as a mother and the woman she chooses to be once she has managed to pull herself from the ashes of grief. The loss will shed a skin for the show even more than Jane finally having sex, but Jane the Virgin remains the most capable show in terms of reinventing itself in the face of major changes. It is a telenovela after all.

The death of Michael Cordero is a heartbreaking plot twist and we will miss him dearly, but the execution of this storyline and surely the episodes immediately after will help cement Jane the Virgin as a game-changing dramedy not only for the progressive CW, but for the TV landscape as a whole. We'll continue to hold our tissues close and follow along for the ride.

Jane the Virgin airs Mondays at 9/8c on the CW.

(Full disclosure: TVGuide.com is owned by CBS, one of the CW's parent companies)