OAKLAND, Calif. -- Scott Kazmir is heading to his hometown Houston Astros and into the thick of a pennant race, and the Oakland Athletics are starting their summer sell-off.

The A's began their expected changes leading up to the July 31 trade deadline, sending the left-hander to the Astros for a pair of minor leaguers Thursday in what could be the first of many significant deals across the majors in the next week.

Oakland received sought-after catcher Jacob Nottingham and right-handed pitcher Daniel Mengden in the swap with its AL West rival -- and the Astros got a top-tier starter as they chase a playoff berth in the season's second half. Houston hasn't been to the playoffs since being swept in the 2005 World Series by the Chicago White Sox when the Astros were still in the National League.

"He's consistently performed against really good competition," Houston general manager Jeff Luhnow said. "He's been in our division, we've faced him. We know how hard he is to go up against."

"Taking him out of the equation as somebody on the other side and putting him on our team I think is really going to help us. We're in a tight division battle with L.A. ... having Kazmir in our rotation will definitely help our chances."

Even with all the trade talk surrounding him, the news caught the 31-year-old Kazmir by surprise. He was scheduled to start Thursday against Toronto and woke up preparing to play at least one more game in green and gold.

Scott Kazmir has been thrust into the race for a playoff berth now that he's been dealt to Houston. AP Photo/Ben Margot

Instead, Kazmir got a phone call from A's general manager Billy Beane and manager Bob Melvin informing him he had been traded. He packed up his belongings in the A's clubhouse while getting hugs and handshakes from teammates.

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

He'll get to work with the Astros immediately, starting on Friday night at Kansas City. He went 5-5 with a 2.38 ERA in 18 starts for Oakland.

Drew Pomeranz started in Kazmir's place against Toronto, and Oakland recalled right-hander Arnold Leon from Triple-A Nashville to take Kazmir's roster spot.

Later in the day, there was another trade involving a contender: Pittsburgh acquired third baseman Aramis Ramirez from Milwaukee for a minor league pitcher.

Change Of Scenery Helps This is the second time Scott Kazmir has been traded during the season, and the Astros are hoping for similar results. In 2009 the Rays dealt him to the Angels and his numbers improved markedly across the board. Rays Angels Starts 20 6 ERA 5.92 1.73 Opp BA .273 .212 WHIP 1.54 1.05 >> Traded on Aug. 29 --ESPN Stats & Information

Nottingham and Mengden were at Class A Quad Cities to start the season before being promoted to the organization's higher A club in Lancaster of the California League. They will report to Class A Stockton.

Nottingham, 20, is listed at 6-foot-3 and 227 pounds. He was a sixth-round pick by the Astros out of Redlands (Calif.) High School in the 2013 MLB first-year player draft. In 168 professional games, he has hit .280 with an .816 OPS.

Mengden, 22, was drafted in the fourth round by Houston out of Texas A&M in 2014. He has 101 strikeouts in 99⅓ professional innings.

While Kazmir has been reportedly on the move for weeks, Beane said he wasn't actively shopping the starting pitcher. But when the Astros included Nottingham in the deal, he said the trade "came together pretty quick."

It's the first of what could be many moves for Oakland before the non-waiver trade deadline. The A's, who made the playoffs the past three seasons,lost Thursday to drop to 44-53 record -- 11 games behind the division-leading Los Angeles Angels.

"We have to be realistic with where we are," Beane said. "The math doesn't necessarily work in our favor given the level of play we need just to get back in it."

Melvin said he didn't have a chance to address players before the game but didn't feel he needed to. He said they know roster turnover is part of the business.

"When you're here in Oakland, you understand that moves are made, whether it's offseason or in-season," Melvin said.

The A's acquired Kazmir as a free agent in December 2013 and he was 20-14 with a 3.12 ERA in 40 starts over parts of two seasons, including making the AL All-Star team last year.

Houston (53-43) began the day in second place in the AL West, two games behind the defending division champion Angels. The Astros were hosting Boston on Thursday night.

"Scott Kazmir is one of the best pitchers in the American League and strengthens our rotation," 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 said it's tough to leave the A's behind, but he's excited to help his hometown Astros make a playoff push.

Houston manager A.J. Hinch raved about adding Kazmir.

"I'm really happy," Hinch said. "I feel like we got better. We were able to get one of the best pitchers that has been rumored to be available and join our team in Kansas City and that's a big boost."

Kazmir was an All-Star with Tampa Bay in 2006 and 2008. He was limited to one start in 2011 with the Angels before going on the disabled list with a lower back strain and being released.

He spent the 2012 season with independent Sugar Land -- just outside Houston -- before bouncing back to go 10-9 with a 4.04 ERA in 29 starts and 158 innings for Cleveland. He has continued to reinvent himself in Oakland and has returned to his status as one of baseball's most reliable arms.

"It's been crazy, to be honest with you," Kazmir said. "Playing independent ball and I'm thinking I would never be able to play professionally. And now I'm going back to my hometown and going to play for the Astros. It's a complete whirlwind, but I'm excited for the opportunity."

Information from ESPN's Jerry Crasnick was used in this report.