It was the deal that had to happen, a match made in heaven for two organizations trending in much different directions.

At approximately 11:59 p.m. on Thursday night, Detroit Tigers ace Justin Verlander was traded to the Houston Astros for three prospects, according to multiple persons with knowledge of the situation.

The two teams had talked extensively about Verlander leading up to the July 31 trade deadline and intermittently over the next month, but finally came to an agreement with less than a half hour to go before the waiver trade deadline. It was then up to Verlander to waive his full no-trade clause, which he did shortly before the 11:59 p.m. ET deadline.

In exchange for Verlander, the Tigers received right-hander Franklin Perez, outfielder Daz Cameron (son of former Gold Glove outfielder Mike Cameron) and catcher Jake Rogers. The financial terms of the deal – thought to be a sticking point throughout the two months’ worth of negotiations – are not known, though USA Today’s Bob Nightengale is reporting the Tigers are paying the Astros $8 million each of the next two seasons, or $16 million total. Verlander makes $28 million in each of the next two seasons.

Perez, 19, is considered one of the Astros’ top two pitching prospects. He is still early in his development, having advanced to Double-A this season. Perez was ranked as the No. 54 prospect in baseball by Baseball America at the beginning of the season.

Cameron, 20, is in a similar stage, an outfielder with tools who has yet to advance past Class A baseball. Cameron was a first-round pick in the 2015 draft. He is the son of former Major League Gold Glove outfielder Mike Cameron.

Rogers, 22, is a young catcher who has yet to advance past Class A ball.

Jake Rogers catching for Tulane
Jake Rogers catching for Tulane

Perez is the Astros' third-best prospect, according to MLB Pipeline, with Cameron 9th and Rogers 11th.

The departure of Verlander means these Tigers are nearly unrecognizable. They are now a team stripped of a franchise player and are fully embracing the rebuild, which was signaled earlier Thursday when they traded left fielder Justin Upton to the Los Angeles Angels.

Verlander, 34, is arguably the best Tigers right-hander of all-time. In 13 seasons with the team, he was 183-144 with a 3.49 ERA and 1.19 WHIP and six All-Star appearances. Last season, he finished second for the American League Cy Young Award and this season, he has surged in the second-half.

For the Astros, they receive a proven postseason pitcher (Verlander is 7-5 with a 3.39 ERA in 16 playoff starts) who should sit atop their starting rotation. They are all but assured of the American League West division title and with a top-ranked farm system, could afford to part with prospects like Perez, Cameron and Rogers.

By trading Verlander, the Tigers have dealt arguably their most recognizable player and have effectively turned the page on an era that began when he won the Rookie of the Year in 2006, helping the team win the AL Pennant.

This season, Verlander has a 3.82 ERA in 28 starts, with 176 strikeouts in 172 innings, and in the second half in particular, has shown himself to be the pitcher he was last season.