TORONTO - Toronto ace Roy Halladay allowed seven runs for the first time in more than two years and Tampa Bay's Carlos Pena and Ben Zobrist each hit home runs as the Rays defeated the Blue Jays 12-7 on Monday.

Halladay (13-7) struggled for the second start in a row as he allowed eight runs, seven earned, on 12 hits and one walk in six innings. Halladay, who fanned eight, last allowed seven earned runs June 5, 2007 also against Tampa Bay.

Rookie Jeff Niemann (12-5) allowed six runs, five earned, eight hits, including Rod Barajas's grand slam in the second inning, in 6 1-3 innings to earn the win before a crowd of 17,185 at the Rogers Centre.

Randy Ruiz hit his fourth homer for Toronto in the eighth against Rays reliever Dan Wheeler.

The Rays were facing Halladay for the fifth time in the past nine weeks and the fourth time in a series opener. He was 1-2 with a 2.10 earned-run average in the first four starts.

Halladay, who lasted just five innings in a loss to the Boston Red Sox in his previous start, gave up five singles and three runs in the first inning.

Jason Bartlett led off the game with a single, but was forced at second by Carl Crawford who advanced on Evan Longoria's single and scored on Zobrist's single. Pena hit a sacrifice fly and Pat Burrell hit a run-scoring single.

But the Blue Jays came back with five in the second that included Barajas's 12th homer of the season and his fourth career slam. Lyle Overbay started the second with a single and finished it by hitting into a double play. Vernon Wells walked and Ruiz chopped an infield hit before Barajas slammed the Blue Jays into the lead.

Travis Snider walked, Jose Bautista singled him to third and took second on the throw. Snider scored when Marco Scutaro's grounder to shortstop resulted in a rundown that nabbed Bautista between second and third.

The Blue Jays scored an unearned run in the third after Ruiz and Barajas singled and the Rays botched a force attempt at second on Snider's grounder in the hole.

But it wasn't enough in this sloppy game. The Rays came back with three runs, two earned, in the fourth assisted by an error charged to Snider.

Gabe Gross doubled with one out and moved to third on B.J. Upton's infield single then scored on Bartlett's single. Snider's throwing error allowed Upton to score and Bartlett to take third. Willy Aybar's infield out, fielded by Halladay, allowed the tying run to score.

Aybar entered the game in the bottom of the third when Crawford left with a back strain. Aybar played second and Zobrist moved from second to left field.

The Rays moved into an 8-6 lead in the fifth when Pena's 35th homer of the season followed a leadoff walk to Zobrist.

Brandon League's first pitch of the seventh became Zobrist's 23rd homer of the season. The Rays scored three runs in the ninth against Shawn Camp, two on a single by former Blue Jay Gregg Zaun.

Notes: Before the game, third baseman Edwin Encarnacion was placed on the 15-day disabled list with a strained hamstring and relief pitcher Scott Downs was reinstated from the DL where he was placed on Aug. 2 with a toe injury. ...Brett Cecil (5-2, 4.58 ERA) will start Tuesday's second game of the series against James Shields (7-10, 3.81 ERA). Marc Rzepczynski (2-3, 3.65 ERA) will start on Wednesday against Scott Kazmir (8-7, 61.17).