The Houston Astros acquired left-handed pitcher Scott Kazmir in a trade with the Oakland Athletics on Thursday.

According to the Associated Press, the Athletics got catcher Jacob Nottingham and right-handed pitcher Daniel Mengden in the trade. The trade was a surprise to Kazmir even though there were trade talks surrounding him. Kazmir was scheduled to start the Athletics game on Thursday night against the Toronto Blue Jays. However Athletics general manager Billy Beane and manager Bob Melvin informed him that he had been traded.

''It felt like it just hit me at once. It's going to take some time to sink some stuff in,'' Kazmir said.

"Scott Kazmir is one of the best pitchers in the American League and strengthens our rotation," Astros general manager Jeff Luhnow said. "His addition gives the Astros a better chance of reaching and succeeding in the postseason. It has been a while since the Astros have been relevant late in the summer, and winning now is a priority."

Kazmir was acquired by the Athletics in December 2013 as a free agent. He was 5-5 with a 2.38 ERA in 18 starts for the Athletics this season, according to ESPN. He went 20-14 with a 3.12 ERA in 40 starts in one and a half seasons with the Athletics. Kazmir made the All-Star team last year.

Kazmir is expected to join the Astros in Kansas City on Friday. The Athletics recalled right-handed pitcher Arnold Leon from Triple-A Nashville to fill Kazmir’s roster spot. The Astros entered Thursday with a 53-43 record and are in second place in the AL West, two games behind the Los Angeles Angels.