PHILADELPHIA — President Biden’s trip Friday was ostensibly part of a nationwide tour to tout his administration’s achievements in the first 100 days.

But Biden’s visit here was closer to a personal ode to a service that has long been central to his political identity.

“Amtrak Joe” traveled to Philadelphia’s 30th Street Station — purposefully this time — to mark the 50th anniversary of the founding of the railroad company that ferried Biden to and from Washington on a nearly daily basis for more than three decades.

“In the past, when I’ve ended up at the 30th Street Station Amtrak station, it’s probably because I took the late train back from Washington and I slept through the Delaware stop — literally,” Biden said, clarifying it only happened “about four times.”

Biden’s affection for Amtrak has long been part of the political canon: Just after his election to the Senate, Biden’s wife and young daughter were killed in a car accident that also injured his two sons. Biden considered resigning his Senate seat, and after being persuaded to stay, he vowed to commute between Wilmington and Washington to take care of his sons.

The necessity borne out of a tragedy morphed into a core part of Biden’s political story. The train journeys, where he befriended the conductors and chatted with constituents, helped him hone his retail politicking skills and reinforced his political sensibilities.

“I used to, literally, look out that window and sit there and see the lights on in the houses,” Biden said in October, during his campaign whistle-stop train tour through Ohio and Pennsylvania. “I’d wonder — do they have the same kinds of conversations at those tables like I did?”

Biden launched his 1988 presidential campaign at the Wilmington train station. His first stop as a 2020 presidential candidate was back at the station, by then renamed the Joseph R. Biden Jr., Railroad Station. He had planned to ride an Amtrak train to Washington for his presidential inauguration, just as he did with Barack Obama for their inauguration in 2009, before security concerns stemming in part from the Jan. 6 insurrection derailed those plans.

So on Friday, Biden finally got his chance to bask in his love of Amtrak, this time as president. He recalled the number of trips he took (in the thousands), the miles he traveled (in the millions) and the exact time of the train he caught from Washington’s Union Station (the 7:28 before it became the 7:32).

He also veered off script to share the personal moments like the time he journeyed back to Wilmington between Senate votes to celebrate his birthday on the train station platform. His 6-year-old daughter was going to be devastated, he recalled, if he wasn’t home to have the birthday cake she made for him.

“I got off the train,” he said. “My wife, Jill, was standing there. My daughter had the cake with a candle lit. I blew them out. She gave me a kiss, walked across and got on the southbound.”

He also recalled the oft-told story when a longtime Amtrak employee named Angelo heartily greeted him on the train when he was serving as vice president, an encounter that rattled the Secret Service agents traveling with him.

“I was getting on the train and [Angelo] came up and he goes, ‘Joey baby!’ and he grabbed my cheek, started to squeeze it like he always did,” Biden said, doing an impression of the conductor. “And I thought he was going to get shot. I’m serious.”

Biden’s speech wasn’t just a love letter to Amtrak. It was also the company’s most powerful cheerleader making the case for a dramatic expansion of Amtrak’s train lines: Milwaukee to Green Bay to Madison! Scranton and Allentown to New York! Indianapolis to Louisville! (Amtrak has unveiled a plan to provide new intercity rail service to 160 communities and released a map that highlighted 30 new possible routes.)

“I’ve been riding Amtrak for almost as long as there’s been an Amtrak,” he said. “I’ve come to see that Amtrak doesn’t just carry us from one place to another. It opens up enormous possibilities, and especially now it makes it possible to build an economy of the future and one that we need.”

In tying the vitality of Amtrak to the economic health of the nation, Biden urged investments in infrastructure to “help America get back on track.” His nationwide tour, which the White House is calling “Getting America Back on Track,” is an effort to pitch the president’s $2.3 trillion jobs plan and $1.8 trillion families plan. That effort began in earnest Wednesday night at the president’s speech to a joint session of Congress and included a stop in Georgia on Thursday with more travel next week.

And while his jobs plan calls for an $80 billion investment in passenger rail service, Biden seemed more eager to relish in stories from his years on the rails than the details of the spending plans.

“I wouldn’t have missed this for the world,” he said, standing in front of the new Amtrak Acela train, which he said he “could hardly wait to ride.”

Biden’s Amtrak ties run in the family, too. Hunter Biden, his son, served a five-year term on Amtrak’s board of directors, a position President George W. Bush nominated him for in 2006.

Blake Weaver, a Philadelphia Amtrak conductor, introduced Biden on Friday. His father, retired Amtrak conductor Gregg Weaver, had introduced Biden as vice president-elect in 2009 before Biden boarded the train with Obama for their inauguration, and he was in the audience Friday.

“In 2006, I had the privilege of meeting Mr. Biden on the train while collecting tickets,” Blake Weaver said. “Before I had a chance to introduce myself, Mr. Biden stopped what he was working on and invited me to sit down to talk to him for a few minutes. I always remembered how he treated everyone. He always made time for both the passengers and the employees. He also treated everyone like they were family.”

Biden said he used to throw a Christmas party for Amtrak employees at his Wilmington home, but the guest list became so large over the years — “because family and retirees kept coming back” — that it was turned into a summer party.

“Amtrak wasn’t just the way of getting home,” he said. “It provided me, and I’m not joking, an entire other family.”