SPOILER WARNING: This article contains major spoilers for "Invasion!", the latest episode of "The Flash."


Tonight's installment of The CW's big "Invasion!" crossover may have been a "Flash" episode, but it wrapped up a major storyline from "DC's Legends of Tomorrow." In an earlier episode of "Legends," Professor Stein and Jax discovered a message from Barry's future in a secret room on the Waverider, and they subsequently struggled with the decision to keep it a secret from the rest of the team. Now that they have come face-to-face with Barry, however, the truth has come out.

Early on in the episode, Stein and Jax played the message for Barry and Oliver. The message -- which was addressed to Rip Hunter -- referenced Flashpoint, as older Barry explained that he had gone back and altered the past, thereby affecting the future. He warned of a coming war, though it was unclear if the fight he was referencing was with the Dominators, and told Rip not to trust him under any circumstances.

RELATED: Green Arrow Tells Supergirl Not to Hold Back in New Crossover Clip

Though Stein, Jax, Barry and Oliver were the only ones to hear the message initially, the secret got out pretty quickly. Cisco discovered the recording and confronted Barry about it immediately. Barry tried to keep it quiet in an effort to compartmentalize the team's problems, but Cisco's voice rose with his anger, and soon the whole team was in on it. Once they were aware of Flashpoint, no one was sure they could trust Barry, especially Digg, who was upset to learn that his daughter Sara had been erased from the timeline. As such, Barry voluntarily stayed back on the first outing against the Dominators, and Oliver joined him in solidarity.

While this seemed like trouble for the team at the time, it became their boon. As it turns out, the Dominators had a device that enables mind control, and they turned it on the "Arrow"-verse's heroes quickly. This set up for a hero vs. hero battle, as the affected heroes returned to STAR Labs to destroy the resistance effort.

RELATED: Arrowverse Crossover Will Reveal New Information About Flash’s Future

Since they were unaffected by the mind-control device, Barry and Oliver were able to fight back. They were able to hold down the fort and protect the people within STAR Labs -- including Cisco, Caitlin, Joe, Iris, HR and Wally -- until Barry came up with a plan to stop their friends without hurting them. He used Supergirl's invulnerability and speed against her by bringing her back to the warehouse with the device, then phasing when she tried to attack him, which caused her to crash into it and destroy it. Shortly thereafter, all of the affected heroes were returned to their proper states.

Just as the heroes were regrouping, the Dominators struck once again. This time, however, they abducted several members of Team Arrow: Oliver, Digg, Thea and Sara. We'll have to wait and see what happens to them in tomorrow night's episode of "Arrow," which will also be the show's 100th.

Starring Melissa Benoist as the Girl of Steel, “Supergirl” airs Mondays at 8 pm ET/PT on The CW. The network is also home to Grant Gustin as the Scarlet Speedster in “The Flash,” airing Tuesdays at 8 pm ET/PT, Stephen Amell as the Emerald Archer in “Arrow,” airing Wednesdays at 8 pm ET/PT and Arthur Darvill, Brandon Routh and Caity Lotz in “DC’s Legends of Tomorrow,” airing Thursdays at 8 pm ET/PT.