Lionel Messi scored twice as Inter Miami beat the defending Major League Soccer champions the Columbus Crew 3-2 to clinch the Supporters’ Shield awarded for the best regular season record.

Messi had been subdued until the 45th minute when he put Inter ahead — chesting down a long ball into the box and getting a lucky bounce off Crew defender Malte Amundsen before poking home.

Minutes later, Messi made it 2-0, taking advantage of a poorly assembled wall to curl a laser-precision free-kick into the corner past the stationary Columbus keeper Patrick Schulte.

Messi, who recently returned from a two month injury absence, has now scored 17 goals and produced 15 assists in 17 matches

But 20 seconds after the start of the second half, Columbus pulled a goal back when the ball fell to Diego Rossi just inside the box and he cleverly curled his shot into the far corner.

Straight from the restart, Columbus gifted Miami a third when Schulte raced off his line but with defender Rudy Camacho in his way, he dropped the ball to Luis Suarez who headed into the unguarded goal.

The Crew battled back again though and made it 3-2 through a Cucho Hernandez penalty after Noah Allen handled in the box.

But once again, the momentum Columbus had gained was lost when Camacho was sent off for a second yellow card after a studs up challenge on Federico Redondo.

Seven minutes from the end though, the Crew had a glorious chance to grab a point — and deny Miami their celebration — when a penalty was awarded for handball against Ian Fray after a VAR review.

But this time Colombian Hernandez’s penalty was weak and Miami keeper Drake Callender dived to his right and saved to secure the Shield for his team.

“I’m happy to achieve the first goal and think about what’s coming. Today was a very tough opponent. We knew it, they are the last champion, of the Leagues Cup. They are a great team,” Messi told Apple TV.

“(Although they were) down a man, we suffered until the end and that shows what this team is,” he said.

Meet again?

The champion of MLS is determined by the winner of the MLS Cup playoffs — where Eastern Conference rivals the Crew and Miami could meet again.

Inter Miami have 68 points with two matches remaining, ensuring they’ll finish the MLS campaign as the league’s best record. If they win both games, they’ll establish a new single-season points record.

Inter, the Eastern Conference top seeds, will have home-field advantage throughout the playoffs.

Columbus are second in the East with Cincinnati, who lost 3-2 to New York City, in third place. Orlando, who beat Philadelphia 2-1 are fourth.

The eighth and ninth placed teams in each conference will meet in the wild card round. The first round of the playoffs are played on a “best of three” basis with the top four teams given two home games. The conference semi-finals and finals are single elimination games.

Messi said the Shield was a “secondary” prize for his team and said the MLS Cup title remains the main goal for the team.

“The first objective has been achieved and now we have to think about what’s next,” he said.

“The first round is three games but then it’s one game and anything can happen. But we have the great advantage of playing all the games at home, which is what we were looking for. We are very strong at home.”

Seventh-placed Charlotte, coached by former Aston Villa manager Dean Smith, secured the final automatic place in the East with Karol Swiderski scoring twice in a 4-3 win over the Chicago Fire.

Brazilian Gabriel Pirani scored twice in stoppage time as D.C. United came from behind to win 4-3 at Nashville and keep their hopes of a wild card spot alive.