SCOTTSDALE, Ariz. — Brandon McCarthy's goal is to earn the No. 5 spot in Oakland's rotation.

SCOTTSDALE, Ariz. — Brandon McCarthy's goal is to earn the No. 5 spot in Oakland's rotation.

At this rate, that shouldn't be a problem because he is pitching like a No. 1.

The lanky right-hander threw seven innings of shutout ball before tiring in the bottom of the eighth and the Athletics went on to beat the San Francisco Giants 6-4 in a matchup of split-squads Sunday.

"He was very efficient. You look at any inning and he rarely had to fight to get through it. He has been pitching with consistency for us all spring," said Oakland bench coach Joel Skinner, serving as manager while manager Bob Geren was with the other squad in Phoenix.

Chris Carter's two-run triple past diving Giants center fielder Andres Torres in the eighth inning proved to be the difference for Oakland.

The McCarthy gave up two runs on five hits, struck out five and didn't walk a batter. He had a goal of 90 pitches, and threw 85. He gave up hits to the first two hitters of the eighth before departing.

Reliever Fernando Cabrera entered and gave up a walk and an RBI groundout to Freddy Sanchez before Aubrey Huff hit a three-run homer, his fifth of the spring.

McCarthy is trying to bounce back from an injury-plagued season. In 2010, he was on the disabled list three times with shoulder problems. He was 4-2 in 11 games (nine starts) for the Texas Rangers' Triple-A affiliate in Oklahoma City.

"You could kind of see the handwriting on the wall, that I wasn't going to figure in (the Rangers') plans, that my time with them was over," said McCarthy, who had gone from the Chicago White Sox to Texas in a 2006 trade. "They (Rangers) were classy in the way they handled it, and I became a free agent."

He signed with Oakland on Dec. 13 and started four games for the Toros del Este of the Domincan Winter League.

Why Oakland, which already had a strong young rotation?

"They have a history of developing good pitchers, so I figured I really had nothing to lose," said the 27-year-old McCarthy.

His shoulder did not require surgery, and he changed his delivery slightly to reduce the strain.

"It was mentally defeating, but you can't allow it to linger. You have to keep throwing, doing what you need to do to make it," McCarthy said.

McCarthy has a 3.09 ERA in five games (two starts).

"I just have to keep attacking the hitter, be consistent, allow the contact and let the ball work for me," he said.

Oakland scored four runs in the second inning, two as the result of a throwing error by Giants left-hander Madison Bumgarner.