WARNING: The following contains spoilers for Star Trek: Discovery Season 4, Episode 13, "Coming Home," streaming now on Paramount+.

For all of Star Trek: Discovery Season 4, the Federation has faced the menace of a dark matter anomaly: an erratically traveling singularity that consumed everything in its path. Discovering that the anomaly was artificially created by the mysterious Species 10-C outside of the galaxy, Captain Michael Burnham led a Federation delegation to reach a peaceful solution, reminiscent of The Original Series. However, Cleveland "Book" Booker and rogue scientist Ruon Tarka vowed to destroy the anomaly themselves. While first contact was made, Tarka betrayed Book and revealed himself as the real villain, even as kidnapped engineer Jett Reno realized Tarka's plan could result in wholesale destruction. So how does this season-long plot resolve?

With the anomaly bearing down on Earth, Sylvia Tilly rallies the Starfleet Academy cadets to help with the mass evacuation to mitigate casualties, working closely with Admiral Vance as they brace for the worst case scenario. Both the Discovery and Species 10-C pursue Tarka to prevent him from carrying out his plan that would risk everything caught in Species-10C's hyperfield and, potentially, Earth and Ni'Var. After General Ndoye confesses she helped Tarka hack into Discovery's systems, Burnham has her confined to quarters while T'Rina attempts to telepathically contact Species 10-C directly in the wake of the communications breakdown. Incapacitated by the psychic feedback, T'Rina reveals that Species 10-C no longer trusts the Federation delegation nor are they able to stop Tarka.

RELATED: Star Trek: Picard Presents an Unstable Q with an Errand of Mercy

Star Trek: Discovery Season 4

Thanks to a plan from Paul Stamets, Discovery uses its Spore Drive to burst free from Species 10-C's grip within the hyperfield, albeit at the cost of temporarily burning out numerous ship systems. Book manages to use a special device to break free from Tarka's impromptu cell and knock him out, regaining control of his ship. As Book attempts to undo Tarka's work, he transports Reno back to Discovery while bracing himself for the possibility that he may not survive the day. Book manages to talk some sense into Tarka as he regains consciousness, only for a tearful Tarka to reveal the program he put into place is irreversible.

As Owosekun and a remorseful Ndoye race after Book's ship in a shuttlecraft while the Discovery carries out repairs to its vital systems, Tarka vows to stop what he started. Book's is ship destroyed, apparently killing both Tarka and Book as a grief-stricken Burnham watches. In the wake of this, Species 10-C invites the delegation for another audience directly with them, with Burnham taking point and joined by many of her senior officers. Using a modified translator prepared by Adira, Burnham explains the danger the anomaly presents to her civilization, resulting in Species 10-C quickly deactivating the anomaly and sparing the Federation. As Burnham explains that she lost her great love to make this meeting possible, Species 1o-C summons Book, revealing it intercepted him before his vessel was destroyed.

RELATED: Star Trek Has Forced Picard to Team Up With His Ultimate Enemy

Star Trek: Discovery Book

After Book admonishes Species 10-C for unknowingly taking lives through the anomaly, the advanced civilization vows to make things right. The first contact meeting ends with Discovery and its delegation transported back to the Alpha Quadrant. Tilly and Vance are relieved to find the damage caused to Earth and Ni'Var was relatively minimal before the anomaly was deactivated. After celebrating reaching a peaceful solution and ending the anomaly's threat, Rillak privately informs Burnham that Book must face justice for all the violations he committed against the Federation when he went rogue; he's taken to a rehabilitation center on Europa for an indeterminate amount of time.

As the Federation rebuilds from the anomaly's approach, many civilizations are inspired by the brave stand the organization made to defend its people from the risk of total annihilation. Both Ni'Var and the Tellarites officially rejoin the Federation, while the Andorians enter negotiations to do the same. Greeting the Starfleet delegation back on Earth is the United Earth President, who personally informs Rillak and Burnham of her desire for the planet to also return to the Federation. The President takes a particular interest in Burnham, with the two discussing Burnham's life in the 23rd century while the Federation continues to grow and spread its message of hope and harmony across the galaxy. Star Trek: Discovery ends on a hopeful note after a fairly dark season.

Created by Bryan Fuller and Alex Kurtzman, the first four seasons are available to stream on Paramount+.

KEEP READING: Star Trek: Picard Reveals Tragic Fates for Many in Q's Twisted Reality