OAKLAND, Calif. – Matt Thornton didn’t have a problem with the pitch he served up for a game-winning hit in his Boston debut.

It was the two walks he allowed earlier in the inning that really irked the left-hander.

Two days after being acquired from the Chicago White Sox, Thornton had command problems that were the difference on a day when Red Sox rookie Brandon Workman had a stellar outing in his first major league start.

Josh Donaldson blooped an RBI single off Thornton (0-4) with two outs in the 11th inning and the Oakland Athletics beat Boston 3-2 to hand the Red Sox their second straight loss following a four-game winning streak.

“Any time you walk guys like that you’re putting yourself behind the eight-ball and you’re right in trouble from the get-go,” Thornton said. “I got myself in a jam then made a pretty good pitch to Josh. But that hit doesn’t matter if I don’t walk guys. Walking guys late in a game will kill you every time.”

It was a tough day all around for the Red Sox.

Left fielder Jonny Gomes struck out three times and was ejected in the ninth inning for arguing with home plate umpire Todd Tichenor. Manager John Farrell managed to convince another umpire to overturn a call in the 10th inning following a botched throw by shortstop Jose Iglesias, only to have it changed again.

The Red Sox also loaded the bases with two outs without benefit of a hit in the 11th before winning pitcher Ryan Cook (2-2) caught Brock Holt looking at a called third strike.

“We fully expected this to be a tough series, and it was,” Farrell said. “Our guys deserve a much-needed couple of days off here.”

Boston still heads into the All-Star break with a major league-leading 58 wins.

The Red Sox also have some more flexibility to their rotation following an impressive debut by Workman, who gave up only two hits and one walk in 61/3 innings to become the first Sox pitcher since 1934 to allow three or fewer base runners in his debut

“I was able to locate my fastball to both sides of the plate early, and I kind of worked off that as the game went on,” said Workman, who struck out five. “I had some (butterflies) in Seattle for my debut, but I was pretty comfortable out there.”

Workman, who started the season with the Portland Sea Dogs before being promoted to Triple-A Pawtucket in June, was called up Friday by the parent club. He took a no-hit bid into the seventh, losing it when Coco Crisp beat out a leadoff infield single. He became the third rookie in four days to pitch no-hit ball into the sixth inning of his first start — Houston’s Jarred Cosart and Cleveland’s Danny Salazar also did it in their debuts.

Dustin Pedroia’s RBI single in the sixth off Oakland starter Bartolo Colon put the Red Sox up 1-0. Holt later singled in Mark Carp, who doubled leading off the seventh.

Donaldson hit a two-run homer off Workman to tie it in the seventh, then singled in the game-winner with two outs in the 11th.

Colon gave up two runs and eight hits over 6 1/3 innings.