SAN JOSE >> Goals galore greeted a sellout crowd that came Wednesday night to see Messi and Inter Miami visit the San Jose Earthquakes.

No, Messi did not score any of the five goals that peppered the nets before halftime. He did, however, assist on a 52nd-minute goal that resulted in a 3-3 draw before the 18,000 fans at PayPal Park.

Messi twice nearly broke the tie in extra time, only to be thwarted by defender Daniel Munie and goalkeeper Daniel. When Messi fell to the turf in the 94th minute in front of the penalty box, no foul was called, the game resumed, and the tie would stand.

Two fans were clotheslined by security guards as they rushed the field at game’s end, while Messi headed to confront the officials over the non-call minutes earlier. Earthquakes coach Bruce Arena and some players intervened so Messi would not overreach on his complaints.

“That is a universal language when talking about refs. He obviously wasn’t happy,” Arena said, “and I wanted to make sure he didn’t get a red card. To get one at the end of the game would be ridiculous. I wanted to get him out to play the next game for Miami.”

The Earthquakes (5-2-6) had won their previous three matches, including one in the U.S. Open Cup. Inter Miami (6-4-2) heads home after an extended trip that began with Saturday’s 4-1 loss in Minnesota.

If there was a winner Wednesday night, it was Cristian Espinoza, who asked Messi pregame for his jersey and indeed walked away with it neatly folded in his arms an hour after the game.

“It was really special for me, to my career,” said Espinoza, who faced his fellow Argentinian once before in a 2016 Spanish league game. “Today I got his jersey so I’m really happy for that, and we both walked off the field as captains, so it was a special moment.”

Each team scored in Wednesday’s opening 2 minutes and 5 seconds, for a 1-1 eye-opener. It was the fifth time in MLS’s 30-year history that two goals have come in the opening three minutes, and it’s the fastest since 2008.

By halftime, San Jose led 3-2, which shouldn’t have been too stunning considering it scored the most goals in MLS entering Wednesday’s matches.

Nor was it surprising that Messi played a role in a tying goal early in the second half, for as Espinoza said: “Messi just has an aura around him. We’re talking about the best player ever.”

Messi helped Inter Miami pull even at 3 in the 52nd minute on Tadeo Allende’s second goal. Messi produced a secondary assist — better known as a hockey assist to the likes of San Jose Sharks legend Joe Thornton, who was in the stands. Messi eluded defender Dave Romney to pass the ball to Baltasar Rodriguez for an ensuing cross to Allende.

None of those first-half goals came from Messi despite his tries: an 18th-minute, right-footed shot zipped wide of the left post; a diving header from the 12-yard mark that Daniel easily saved in the 40th minute; and, a 25-yard, left-footed free kick that missed wide of the right post as the half expired.

“For the most part, we did a good job on Messi,” Arena said. “He was threatening throughout the game and out guys did a good job.”

Seemingly every time Messi touched the ball, the crowd reacted in unison, more so with cheers than jeers. He did not speak with reporters afterward as has been the case since shortly after his 2023 MLS arrival.