LOS ANGELES — Luke Williams felt the wrath of the Philadelphia Twitterverse on Sunday after the Phillies posted a photo of him wearing a Brooklyn Nets jersey for the team’s flight to Los Angeles.

Four days earlier, Williams hit a walk-off homer in his first big-league start, but even that didn’t provide him enough goodwill to wear the jersey of a team that the 76ers may face in the postseason.

Once a hero, Williams was ripped on social media for wearing a Kevin Durant jersey as part of the Phillies’ basketball-themed road trip.

“It was bound to happen sooner or later right? Everyone gets roasted,” Williams said before Tuesday’s game at Dodger Stadium.

But Williams’ Nets jersey comes with a good story.

“My brother lived in Brooklyn, pre-COVID. My oldest brother, Jake,” Williams said. “He lived in Brooklyn for about a year, then moved out because of COVID and everything. He stumbled upon Nets season tickets. We kind of split on playoff tickets. And then sure enough, we had a Monday off in the minor leagues and I was like, ‘Oh my gosh, I’m going to be in Allentown, like, Jake, I’m taking the tickets.’ He’s like, ‘Oh, absolutely.’ I asked Mickey Moniak if he wanted to come and we went.”

Williams returned a day earlier from helping Team USA reach the Summer Olympics, but didn’t think he was being promoted just yet to the big leagues. At least that’s what he thought when boarded the Brooklyn-bound “2” train with Moniak, who climbed the minors with Williams after they were drafted a year apart.

And then Williams’ phone rang.

“The train was moving. I got the phone call. I really didn’t think much of it,” Williams said. “Because [Phillies director of player development] Josh Bonifay had called me earlier and was like, ‘Hey, you in Allentown, all settled in?’ I was like, ‘no, I’m actually going to New York. I’m going to the Nets game.’ ‘Oh, OK.’ And then ended the phone call. And then I got another phone call from him and was like, ‘Huh, this is kind of weird.’ Mickey was the first one that noticed it. His eyes kind of opened up.”

» READ MORE: Zack Wheeler’s slider — or is it a cutter? — has helped him become one of baseball’s best pitchers

“I was like, ‘There’s no way.’ I answered it and [triple-A manager] Gary Jones was on the other line. He said, ‘We’re giving you your outright release because you’re going to the big leagues.’ Then the phone call cut off. Because we were down in the subway.

“So Mickey and I had like 5-10 minutes to just kind of go crazy and enjoy the moment together. Then we stepped off the train and we were like, ‘Huh, I wonder what everyone was thinking on the train?’ Oh, we hugged. We high-fived. We were both kind of like, shed some tears. And then I was like, ‘Man, I wonder what these people were thinking.’”

Six years after being drafted, Williams had reached the majors, perhaps becoming the first Phillies player to learn the news while on the subway to an NBA playoff game. It was a moment he dreamed of and he said it was perfect to learn the news with his buddy Moniak by his side.

“That is why I have the KD jersey. I bought it that day,” Williams said. “It’s the one basketball jersey I have. Mickey and I were like, ‘We have to buy jerseys, just to remember this moment.’”

And if the 76ers play the Nets in the Eastern Conference finals?

“I have the 76ers,” Williams said.