Friday night had given way to Saturday morning at Yankee Stadium. The Yankees and Red Sox were putting in a lot of overtime, stuck in a tie, in the top of the 18th. Dustin Pedroia stood perched on first base with one away after David Ortiz flied out.

Time for two of the new guys in the rivalry to take a swing at untying this game that didn't want to end.

Red Sox cleanup man Hanley Ramirez: hard single to right-center. First and third.

"Kung Fu Panda," aka Pablo Sandoval, your turn: hard single to center. Sox take the lead.

The Yankees tied it, but Boston won the marathon in 19 innings, 6-5. Sandoval finished as the tired owner of four hits and two RBIs and Ramirez as the weary owner of three hits. Each had nine at-bats.

They helped collaborate for a run with a pair of singles in the first inning, too.

advertisement | advertise on newsday

This is what Red Sox general manager Ben Cherington had in mind during his offseason shopping spree when he signed the two big free-agent bats. They have helped form a more formidable heart of the lineup along with Ortiz in a bid for another worst-to-first journey, just like in 2013.

"We added two proven guys, two All-Star-caliber players in the middle of the order," manager John Farrell said. "Offense was clearly something we needed to address in the offseason. Ben did a great job of identifying two guys."

The Sox gave Sandoval 95 million reasons to come. It was a five-year deal, plus a $17-million club option.

"It's not about the contract," Sandoval said before going 1-for-5 in Saturday's 8-4 win that gave Boston a 4-1 start. "It's about the team, how you're feeling, how they show you the love, if you feel comfortable with that. You want to come to the place where you feel comfortable. So that was what I decided -- being comfortable."

Ramirez got $88 million over four years, plus a $22-million vesting option based on plate appearances.

Yankees videos

"I know what type of player he is," Yankees manager Joe Girardi said of Ramirez, whom he managed with the Marlins in 2006. "They beefed up their lineup."

Leadoff man Mookie Betts knows the offensive punch the two can bring. He saw it firsthand last Monday when Ram- irez cracked two homers, including a grand slam, in the opener at Philadelphia.

"But I think it goes deeper as far as chemistry -- laughs and jokes," Betts said about their jovial demeanor. "I think that's where things will change. Obviously, on the field, we're going to be a lot better because we can laugh and enjoy the time while we play."

In the past, Ramirez has been accused of being too relaxed. Braves manager Fredi Gonzalez, who managed Ramirez when he was with the Marlins, once pulled him for failing to hustle. But Ramirez has turned 31 and has said he has learned along the way.

The Red Sox originally signed him in 2000 as a 16-year-old out of the Dominican Republic. He became a top prospect and was brought up in September 2005, getting two at-bats. But two months later, Boston sent him to Florida in a deal for Josh Beckett and Mike Lowell.

advertisement | advertise on newsday

"I was a little bit sad," Ramirez said after getting Saturday's game off to rest, "but after that, it was my chance to play in the big leagues."

After last season with the Dodgers, his agent talked to the Red Sox about a sequel. They signed a career .300-hitting infielder and three-time All-Star to play the outfield, which is a work in progress.

"This is home," said Ramirez, off to a .318 start. "I was really excited. Everyone that was playing for another team, people kept telling me that I was going to come back to the Sox."

It seems strange that Sandoval isn't back with San Francisco, where he was a popular guy, complete with fans wearing those panda heads in his honor.

The switch hitter, who is 5-11 and listed at 255 pounds, is only 28. He arrived as a career .294 hitter and boasts a .426 World Series average, the second-best in history for those with at least 50 plate appearances. Last year, he claimed his third ring with the Giants in five years after setting a record with 26 hits in a single postseason.

advertisement | advertise on newsday

Pressure? "Yeah, I love it," Sandoval said.

But discussions on an extension didn't go well heading into the 2014 season, and San Francisco cut off the talks. Sandoval wasn't happy with how management dealt with his agent, nor its effort to retain him. So the two-time All-Star rejected the Giants' late offer. He's off to a .269 start this season.

Asked if he wishes his old team made a stronger push to keep him before last season, Sandoval said: "It's the past. I'm happy where I am right now. I'm moving forward."