PHILADELPHIA (AP) -- After years of trade speculation, Cole Hamels' time in Philadelphia is ending.
Two people familiar with the deal say the Phillies have agreed to trade the ace left-hander to the Texas Rangers for a package of prospects.
Both people spoke to The Associated Press late Wednesday night on condition of anonymity because the trade had not been finalized. Hamels has a limited no-trade clause but does not have to approve a deal to the Rangers.
Hamels would become the first pitcher in major league history traded during a season immediately after throwing a no-hitter - he no-hit the Chicago Cubs on Saturday at Wrigley Field.
''He's definitely a great pitcher,'' Rangers first baseman Mitch Moreland said after Texas beat the New York Yankees 5-2 Wednesday. ''Obviously watched the no-hitter the other day, pretty impressive. He's got a long track record of great success. It will be huge for us.''
The 2008 World Series MVP was an integral part of the greatest run in franchise history when the Phillies won five straight NL East titles, two pennants and one World Series from 2007-11.
''He's been here a long time, but that's baseball,'' Phillies catcher Carlos Ruiz said following an 8-2 loss at Toronto. ''Definitely it's sad when you're around one of your teammates for a long time and then they have to go away.''
The rebuilding Phillies, a big league-worst 38-64, traded All-Star closer Jonathan Papelbon to Washington on Tuesday. Both players made it clear they wanted to play for contenders.
Texas is seven games behind AL West-leading Houston and four games behind Minnesota for the AL's second wild-card spot.
There was thought the Phillies might wait to move Hamels in the offseason after recently hired executive Andy MacPhail officially replaces Pat Gillick, but general manager Ruben Amaro Jr. pulled the trigger with MacPhail's input.
Hamels was 114-90 with a 3.30 ERA in 10 seasons in Philadelphia. He went 7-4 with a 3.09 ERA in 13 postseason starts and also earned MVP honors in the '08 NLCS.
Hamels has three years remaining in a $144 million, six-year contract, a deal that includes a club option for 2019. He's owed $22.5 million per year through 2018 with a club option for 2019 at $20 million or a $6 million buyout. His option becomes guaranteed at $24 million if he throws 400 innings or more in 2017-18, including at least 200 in 2018, and isn't on the disabled list at end of 2018 with left shoulder or elbow injury.
More Phillies could be on the move before Friday's deadline to trade players without first securing waivers. Outfielders Jeff Francoeur and Ben Revere and righty Aaron Harang could help teams in the pennant race.
Philadelphia would like to deal 2006 NL MVP Ryan Howard but his contract makes it difficult. He's owed $25 million this year and next, and the team has a $23 million option for 2017 with a $10 million buyout.
Howard, Ruiz and Chase Utley are the only remaining players from Philadelphia's 2008 championship team.
AP Sports Writers Ronald Blum and Stephen Hawkins, and AP freelance writer Ian Harrison contributed to this report.