After the Mets’ recent four-game losing streak, including a sweep by the NL East rival Nationals, general manager Sandy Alderson said they had to find their answers within. Two straight wins over the Cubs, who came in with the best record in baseball, have reinforced Alderson’s belief that the Mets can do just that.

They tied a franchise record with five home runs in a rain-delayed 10-2 victory over the Cubs on Friday night at Citi Field, and for the second straight night, they got a timely jolt of energy from rookie Brandon Nimmo, who just might be the spark that lights their fire for the second half.

James Loney and Asdrubal Cabrera staked the Mets to a 2-0 lead with back-to-back homers in the second inning off Cubs starter Jason Hammel (7-5) just before a rain delay that lasted 1 hour, 8 minutes. When play resumed, Loney added a two-run double in the third inning.

Mets starter Jacob deGrom (4-4), who put an end to a career-high streak of 10 games without a victory, got off to a brilliant start with a fastball hovering around 96 mph. He retired 10 of the first 11 batters he faced, allowing only a first-inning walk to Kris Bryant. With one out in the fourth, Bryant broke up the no-hit bid, homering into the second deck in leftfield to make it 4-1.

Any chance the Cubs had to make a game of it disappeared in the bottom of the fourth when Nimmo launched his first major-league homer, a three-run shot with two outs, deep into the bullpen in right-center to give the Mets a 7-1 lead. The rookie’s feet barely touched the ground as he sped around the bases before taking his first curtain call in New York.

advertisement | advertise on newsday

“I was loving everything in the dugout and enjoying the moment,” Nimmo said. “I couldn’t believe it just happened. Then Dickie [bench coach Scott] was like, ‘Get out there, Brandon.’ That’s when I noticed the crowd noise. So I ran out there.

“That’s a dream come true. It just never occurred to me I would get a curtain call, and to get that in the second game here at Citi Field is just amazing.”

Manager Terry Collins said the rookie has added a burst of energy to the clubhouse, and his exuberance was on display again in the top of the fifth when he made a diving catch for the third out near the rightfield line on a sinking liner by Hammel.

“The field is wet, so you slide a long ways after it,” Nimmo said. “It’s just fun to go around the field making plays and to hear the crowd cheer.”

The crowd of 34,294 had more to cheer in the fifth when Yoenis Cespedes led off with his 20th home run before Cabrera added a two-run shot for his fourth career multihomer game and a 10-1 lead. There was another 40-minute rain delay, but the shower of home runs washed away the sting of being swept by the Nationals.

Mets videos

“I knew we’d bounce back,” Collins said, “and the last two nights we bounced back.”