Baltimore began Wednesday five games back of Boston in the AL East and in the second wild-card position.
The Diamondbacks have fallen 3½ games behind the surging Dodgers and needed lefty relief help. Thatcher is 3-1 with a 2.10 ERA in 50 games this season. He has limited left-handed batters to a .215 average.
"It's exciting to get traded. It's a big deal. It brings excitement to be in a pennant race," Thatcher said. "That is all you ask for, is to win. I'm looking forward to getting over there and helping out and doing whatever they need from me."
The Diamondbacks also got 23-year-old right-hander Matt Stites, who is 2-2 with a 2.08 ERA and 14 saves in 46 games with Double-A San Antonio.
Kennedy, 21-4 two seasons ago, is 3-8 with a 5.23 ERA in 21 starts and hasn't won a game in two months.
He's expected to start Sunday at Petco Park against the New York Yankees, the team that took him in the first round of the June 2006 draft.
Copyright 2013 The Associated Press. All rights reserved. This material may not be published, broadcast, rewritten or redistributed.