HOUSTON (AP) — The Astros are bringing back Justin Verlander, acquiring the three-time Cy Young Award winner from the New York Mets in a trade deadline blockbuster Tuesday, Houston owner Jim Crane told The Associated Press.

The Astros are sending top outfield prospects Drew Gilbert and Ryan Clifford to New York. Crane said the Mets are sending roughly $54 million to Houston to help pay off Verlander's contract. The 40-year-old signed an $86.7 million, two-year deal with the Mets in December that includes a vesting option for 2025 at $35 million.

“(General manager) Dana (Brown) and his team worked on it hard,” Crane told the AP. “After we looked at the numbers — it’s always tough to give up prospects, but I think they determined that it was the right move. We needed starting pitching. He’s been throwing well. And I think the other factor is they ate a lot of the contract. So it wasn’t a really hard decision. It was just would we give up enough prospects?”

The underperforming Mets are dismantling the most expensive roster in major league history. They dealt ace Max Scherzer to the Texas Rangers on Sunday and followed up Tuesday by shedding Verlander.

Verlander earned his 250th career victory on Sunday, and 61 of those came with Houston. He was first acquired from the Detroit Tigers during the 2017 season, when he helped pitch the Astros to a World Series title.

He won his third Cy Young Award and second World Series with Houston last season, then became a free agent.

Verlander opened the season on the injured list and struggled upon his return. He's recently been back in top form, going 4-1 with a 1.49 ERA in his past seven starts. He's 6-5 with a 3.15 ERA in 16 starts overall this season, striking out 81 in 94 1/3 innings.

The Astros have won the AL West in five of the past six seasons but currently trail the Texas Rangers by half a game.

New York at one point had a projected payroll of $365 million bolstered by billionaire owner Steve Cohen, but the club entered Tuesday 50-55 and six games out of the final NL wild-card spot. Cohen paid off around $35 million remaining on Scherzer's contract to facilitate that deal with the Rangers, which returned top prospect Luisangel Acuña, the younger brother of Atlanta Braves star Ronald Acuña Jr. It was unclear if New York was paying down any of Verlander's salary.

Gilbert, 22, was a first-round pick by Houston in 2022 who ranks 68th on MLB.com's Top 100 prospect list. He's a potential five-tool player who dominated at Class A early this season — hitting .360 with a 1.107 OPS — before slumping after a demotion to Double-A. He's hitting .241 with six homers and a .713 OPS in 60 games.

The 20-year-old Clifford was an 11th-round selection in 2022 whose stock has risen since. He's hitting .291 with 18 home runs and a .919 OPS at two A-ball stops this season.