Shohei Ohtani hit his major league-leading 31st homer of the season for the Los Angeles Angels in the team's 6-5 walk-off victory over the Baltimore Orioles on Sunday.

With his third-inning solo shot off Baltimore starter Thomas Eshelman at Angel Stadium, Ohtani tied the record for the most homers in a Major League Baseball season by a Japanese-born player. The record was set by Hideki Matsui when playing for the New York Yankees in 2004.

"It makes me happy that I've matched a player I've looked up to since I was little. But we're still in the first half of the season so I'm taking it one step at a time."

Ohtani, who turns 27 on Monday, now has four more homers on the season than Vladimir Guerrero Jr. of the Toronto Blue Jays and five more than Fernando Tatis Jr. All three players were elected by the fans to start this year's All-Star Game.

Shohei Ohtani of the Los Angeles Angels hits his 31st home run of the season in the third inning of the team's 6-5 walkoff win against the Baltimore Orioles in Anaheim, California in July 4, 2021. (Kyodo) 

Ohtani finished the day 1-for-4 with two strikeouts, and his batting average remained unchanged at .278.

One out after Ohtani's 14th homer in the last 17 games, Anthony Rendon added a solo shot of his own off Eshelman that made it 4-0.

Eshelman lasted just four innings, but Baltimore battled back with a four-run rally in the sixth and a Cedric Mullins go-ahead homer in the top of the ninth before Cole Sulser (2-1) unraveled on the mound.

Despite the five run turnaround, the Angels managed to rally in the ninth to complete a sweep of the Orioles.

Shohei Ohtani of the Los Angeles Angels rounds the bases after hitting his major league-leading 31st home run of the season, a solo shot, in the third inning against the Baltimore Orioles on July 4, 2021, at Angel Stadium in Anaheim, California. (Kyodo) ==Kyodo

With the bases loaded in the bottom of the ninth, Juan Lagares smacked a double into right center field off Sulser to score two runs and win the game.

Raisel Iglesias (6-3) got the win despite giving up the homer to Mullins.

At Kauffman Stadium in Kansas City, Kenta Maeda pitched six shutout innings in his best outing of the season, helping the Minnesota Twins beat the Kansas City Royals 6-2 and snap a five-game losing streak.

Maeda (4-3), who recently returned from a groin injury, allowed just two hits and a walk in his 97-pitch outing while striking out a season-high 10 batters. Teammates Max Kepler, Jorge Polanco and Alex Kirilloff contributed offensively with homers.

Related coverage:

Baseball: Shohei Ohtani makes history as 1st-ever 2-way MLB All-Star

Baseball: Shohei Ohtani named AL Player of the Month for June