St. Louis and Tampa Bay announced the trade on Tuesday afternoon. The Cardinals received outfielder Justin Williams, left-handed pitcher Genesis Cabrera and right-handed pitcher Roel Ramirez in the deal. The Rays received Pham and international cap space from the Cardinals.
Pham, 30, has hit .248 with 14 home runs and 41 RBIs in 98 games this season for the Cardinals. He hit a career-best .306 with 23 home runs and 73 RBIs in 128 games last season in St. Louis.
Williams, 22, was the Rays' No. 14 prospect, according to MLB Pipeline. He went 0-for-1 in his only at-bat this season for the Rays, grounding into a double play on July 21 against the Miami Marlins. Williams hit .258 with eight home runs and 46 RBIs in 94 games this season for the Triple-A Durham Bulls.
Cabrera, 21, was the Rays No. 25 prospect. He had a 4.12 ERA and a 7-6 record in 21 appearances this season for the Double-A Montgomery Biscuits.
Ramirez had a 2.53 ERA, a 3-1 record and one save in 34 games this season at the Class-A Advanced and Double-A levels.