It may only be a mirage, but the Oakland Athletics entered play last night just six games out of first place in the American League West and lead the race for the second wild-card spot.

A lot of people chuckled and scratched their heads at what general manager Billy Beane was doing since the end of the 2011 season. He traded valuable young pitching in Andrew Bailey, Trevor Cahill and Gio Gonzalez; signed aging veterans Bartolo Colon and Johnny Gomes; picked up the three Brandons — Moss, Hicks and Inge — off the waiver wire; and signed Cuban free-agent outfielder Yoenis Cespedes to a four-year, $36 million contract.

Who’s laughing now?

At 14-2, Oakland has baseball’s best record in July, and the A’s are 8-1 since the All-Star break. They just swept the Yankees in a four-game series at home for the first time since 1913, when the franchise was based in Philadelphia. The only other time in the last 100 seasons that the A’s swept the Yanks in a four-gamer was in July 1972 at the old Yankee Stadium.

The A’s culminated the sweep with a stirring comeback from four runs down against CC Sabathia and won the game in the last of the 12th inning on a single by Coco Crisp. It was Oakland’s major-league leading 11th walkoff win of the season and the sixth in the Athletics’ last 11 home games.

In the first three games of the series, Oakland’s winning pitcher was a rookie — Jarrod Parker, Ryan Cook and A.J. Griffin. According to our friends at the Elias Sports Bureau, the last team to beat the Yankees three games in a row with a rookie pitcher getting the decision was the 1916 Cleveland Indians. The winners in those three games were Al Gould, Stan Covelski and Otis Lambeth.

Oakland’s pitching is for real. The A’s lead the AL and are fourth in the majors with a 3.38 ERA. They also rank first in the league in allowing the fewest homers (77), the lowest batting average (.241) and the lowest slugging percentage (.370).

The Oakland staff would probably have even more impressive numbers if they were facing its own hitters. Therein lies the problem with the A’s. They have scored 362 runs, the worst in the majors, and their overall slash line of .228/.302/.377 (batting average/on-base percentage/slugging percentage) is troubling, to say the least.

The A’s are especially offensively challenged at catcher, where Kurt Suzuki is batting .211; at second base, where Jemile Weeks is hitting a lofty .216; at shortstop, where Cliff Pennington is hitting .197; and at third, where Inge is batting .210, although he does have nine homers.

With six days to go until the trading deadline, Beane may have to swing a deal or two to add much-needed offense to a weak lineup. Although there are some who will say that the A’s are built with an eye toward the future and shouldn’t sacrifice that for the present, when a team — especially a small-market team — gets this close, you have to take your best shot.

While it’s true that the A’s are a long shot in a division that features two-time AL champion Texas and the loaded Los Angeles Angels, that’s a lot better than having no shot.

SCRATCHING THEIR ICH: Ichiro Suzuki entered the season with a career batting average of .322 and an OBP of .366 and he went into Monday's game in Seattle after being traded to the Yankees at .261 and .288, respectively. The first reaction might be that the Yankees acquired a fading star. That would be wrong.

The theory here is that Ichiro was worn down by all the losing with the Mariners and will be rejuvenated by going from a team with the most losses in the league to the team with the most wins. Also, there’s something about Yankee Stadium and the Yankees uniform that has a way of bringing out the best of whatever is left in a player.

QUICK HITS: The Pirates hit 107 home runs the entire 2011 season. They have 104 already this season, and it's not even August St. Louis equaled a club record set in 1926 by scoring 12 runs in the seventh inning against the Cubs on Saturday night. The Cardinals tied a major-league record by hitting seven doubles in the inning. The only other team to do that was the Boston Bees against the Cardinals in the first inning on Aug. 25, 1936. ... According to Elias, when Matt Cain and Cole Hamels each homered on Saturday, it was the first time ever that two pitchers selected as All-Stars homered during the same game that season.

Contact Rick Freeman at rfreeman@njtimes.com.

Follow the Times of Trenton on Twitter.