ST. LOUIS — Gabe Kapler sat in his Busch Stadium office Sunday morning and dug into his material.

The Phillies manager, with his iPad opened on his desk, perused a list of players who had reached base safely in as many consecutive games as Odubel Herrera's streak of 45. The list was full of Hall of Famers and all-stars. Herrera was in good company, Kapler said.

And a few hours later, the streak was finished after Herrera went 0-for-4 with three strikeouts as the Phillies lost to the Cardinals, 5-1. His 45-game streak was the fourth-longest in Phillies history and only 12 games shy of tying Mike Schmidt's 56-game record set in 1982.

"At some point, the streak had to end," Herrera said. "Now, I'm looking forward to starting a new streak."

Sunday was the first time Herrera failed to reach base since Sept. 26 of last season. He said he knew of the streak only because he was reminded "every single day" about it on social media. Without the tweets, Herrera said he probably would not have even realized anything. But being aware of the streak did not add pressure, Herrera said.

"Actually, I used it as motivation," he said.

Herrera has been the lineup's catalyst since the Phillies found him before the 2015 season on the Rule-5 scrapheap. He leads the National League with a .344 batting average and a 2.4 WAR. His on-base percentage (.411) and OPS (.955) both rank sixth. His on-base streak just magnified what the Phillies already knew.

"I think he's among the most entertaining players in baseball," Kapler said last week. "Taking the big swing and the helmet comes off. He's fun to watch. He continues to square the baseball up. He continues to get on base via the walk and seems more comfortable with that than he was last year. Good all-around baseball player and exceptional offensive player right now."

The Phillies were still able to leave St. Louis with a split of the four-game series. They return home winners of eight of their last 11 and prepare for a showdown on Monday with the first-place Braves, who lead the Phillies by 1 ½ games in the National League East.

"There is a lot of adrenaline going into that series," Kapler said. "We feel like we match up very well against them, and, more than anything else, we're not going to get outworked or prepared."

Herrera – and the rest of the Phillies – were silenced by Cardinals rookie righthander Jack Flaherty, who struck out a career-high 13 to earn his first major-league win. He dominated the Phillies with his slider, throwing it for 35 percent of his 120 pitches and using it for six of his strikeouts. He allowed just two hits and both came off his fastball. Rhys Hoskins jumped on a first-pitch fastball in the fourth and homered it to left but that would all the Phillies could do.

Aaron Nola allowed four runs in six innings as he lost his first start since April 16. He would have been the first Phillies pitcher since Cliff Lee in 2011 to win six straight starts. Nola (6-2) struck out six, walked one, and allowed four hits. He struggled with his command and the Cardinals pounced. It was a rare off day from Nola, who has admired what Herrera has done this season.

"He's pretty special," Nola said. "His hands are so great. It's pretty fun to watch him at the plate. When you're watching him and he's out front, his hands are still back, so he can hit velocity and also foul off slow pitches. For me, that's a thing that's pretty special to watch. He can foul balls off when he needs to and then he puts a really good swing on the next pitch. He's a special player."

Herrera's final chance to extend his streak came with two outs in the ninth inning against powerful righthander Jordan Hicks, armed with a 100-mph sinker. Herrera said he'd never faced that kind of power. And it was his antics that Hicks said gave his pitch a bit more power. The pitcher told reporters after the game that Herrera's tendency to stall between pitches "amps" him up.

"So I bring it against him," Hicks said.

Hicks threw Herrera five pitches and they were five of the fastest pitches he's thrown this season. Herrera fouled off sinkers of 105 and 104 mph before he struck out on a 103.7-mph one. Herrera said his first exposure to that kind of heat was a good learning experience. Herrera ran to first after striking out when the sinker skipped away for a wild pitch. But the streak was over, as Herrera did not reach base safely. And two batters later, the game would be, as well.

"Even though I got on base, I knew the streak was over," Herrera said.