BOSTON — Joe Girardi said the Yankees’ signing of Billy Butler could be boiled down to a simple hope.

“I think it’s, in a sense, trying to catch lightning in a bottle,” Girardi said.

The Yankees, looking for a righthanded hitter with Aaron Judge likely lost for the season with an oblique strain, officially signed Butler on Thursday. Butler, 30, cut loose by the A’s over the weekend with one year left on his three-year, $30-million deal, was in the lineup as the DH Thursday night and likely will be slotted there the rest of the season against lefthanded starters.

“Over his career, he’s been pretty successful against lefthanders,” Girardi said of Butler, who landed in Boston at about 4:30 p.m. Thursday and arrived at Fenway Park in time to take on-field batting practice a little over an hour later. “We’re seeing three here, and one or two in Tampa . . . so we brought him in to help.”

Butler, who hit a sacrifice fly and an RBI single as the Yankees took a 5-1 lead in what became a 7-5 loss to the Red Sox on Thursday night, had a .276/.331/.403 slash line, four homers and 31 RBIs in 85 games with the A’s before being released. Against lefthanders, the 6-foot, 260-pound Butler, nicknamed “Country Breakfast,” had a .262/.316/.369 slash line with one homer and 14 RBIs.

In his career, Butler has a .299/.381/.491 slash line, 54 homers and 218 RBIs in 1,372 at-bats and 666 games against lefthanders.

advertisement | advertise on newsday

“I watched his at-bats the last couple of weeks. To me, they’ve been pretty good,” Girardi said. “So if he gives you those good at-bats, you’re going to feel good about what he does.”

Girardi said the team was not concerned about an incident that took place earlier in the season between Butler and one of his A’s teammates, Danny Valencia.

Butler, according to the San Francisco Chronicle, interrupted a clubhouse conversation Aug. 19 between Valencia and an equipment rep and said Valencia was using spikes in breach of his contract. According to the Chronicle, Valencia punched Butler, resulting in his being placed on the seven-day concussion disabled list.

“That had nothing to do with the situation of me getting let go,’’ Butler said after Thursday night’s game. “I had an altercation with Danny and that happens from time to time with teammates. Definitely happens in a season when we were doing as bad as we were, definitely tempers flare. It had nothing to do with me getting let go, just two bad seasons, and they’re going through a youth movement. I just didn’t fit in there anymore. Didn’t go the way I wanted it, but there’s always new opportunities. That’s why I’m grateful to be here and hope to push this team over the top.”