(Nam H. Huh / AP)

The Nationals formally announced Monday morning a swap of players with the Chicago Cubs, sending minor league right-handed starter Ivan Pineyro and a player to be named later to the Cubs in exchange for veteran right-handed outfielder Scott Hairston and player to be named later. The move addresses the Nationals’ underperforming bench with an experienced hitter with a track record of mashing left-handed pitching, another of Washington’s weaknesses this season.

The Nationals had been interested in improving their bench with a veteran right-handed hitter and found one in Hairston, a 33-year-old in his 10th season. Hairston signed a two-year, $5 million contract this offseason, and the Nationals will also control his rights next season.

The move comes at an opportune time for the Nationals, the worst hitting team against left-handers this season, as they head to Philadelphia for a four-game series beginning Monday which includes facing three left-handed starters: John Lannan, Cole Hamels and Cliff Lee. Hairston is expected in Philadelphia with the Nationals on Monday. The Nationals have an open spot on their 40-man roster but would have to make room on the active roster for Hairston, perhaps struggling right-hander Tyler Moore.

Pineyro, 21, is one of the first wave of players signed in the Dominica Republic to rise through the Nationals system following an overhaul of their academy in 2009. The right-hander was signed in 2010 and posted a 3.24 ERA in 15 starts across Class A Hagerstown and Potomac this season. Recently promoted to Potomac, he struck out 72 batters in 77 2/3 innings this season.

Hairston has struggled this season with limited playing time, hitting .172/.232/.434 with eight home runs over 112 plate appearances. Last year, Hairston slugged .550 with an .867 OPS against left-handed pitching. He hit .268 overall with an .803 OPS and 20 home runs last year with the New York Mets. He has a career .268 average and .813 OPS against left-handed pitchers.

According to a rival evaluator, Hairston is a low fastball hitter who crushes fastballs down and across the middle of the plate, and can hammer mistake breaking pitches.

After a strong season in 2012, the Nationals bench has been underwhelming this season. They are 23rd in the majors with a .174 average pinch-hitting because of the struggles of Chad Tracy, Steve Lombardozzi, Roger Bernadina, Moore and others. Moore, a right-handed batter, was expected to fill the role of backup outfielder-first baseman who could pinch hit and face left-handed pitching when needed, but he has hit .157 in 102 at-bats and .130 against left-handers. Hairston, though, has never played first base.

As a team, the Nationals have struggled against left-handed pitching. The Nationals are last in the majors with a .218 average and .626 OPS against southpaws.

Hairston may have struggled this season for a handful of reasons. The National League Central is right-handed pitching heavy. And he may have had some bad luck; his .129 average with balls in play is far below his career average of .272.

The deal for Hairston also fits the pattern of General Manager Mike Rizzo, who prefers to avoid one-season rental players. Hairston was drafted by the Arizona Diamondbacks in the third round in 2001, when Rizzo was head of scouting there. Hairston’s brother, Jerry Hairston Jr., played for the Nationals in 2011 before they Nationals traded him to the Brewers shortly before the trade deadline. The deal was first reported by Fox Sports late Sunday night.

Two rival executives have said the Nationals also appear to be seeking a starting pitcher with Ross Detwiler on the disabled list for the second time this season and Dan Haren’s uncertain status as he returns from the disabled list in the midst of the worst season of his accomplished career.