KANSAS CITY, Mo. — The Mets and Royals will make baseball history Sunday night with the first World Series rematch played on an Opening Day, the continuation of an out-of-leftfield rivalry that began in October.

But while Mets-Royals is a 21st century concoction, New York’s baseball ties with Kansas City go way back. Way, way back, mostly thanks to a number of Yankees-related connections.

It began when a certain future Yankees and Mets manager named Casey Stengel grew up here, attending old Central High School before it moved 101 years ago to its current location at Indiana Avenue and Linwood Boulevard.

Stengel’s given name was Charles, but early in his career they called him “K.C.” in reference to his hometown, and eventually that turned into just plain “Casey.”

In 1937 Muehlbach Field, home of the Kansas City Blues minor league team and the famed Kansas City Monarchs of the Negro Leagues, got a new name, Ruppert Stadium, in honor of Yankees owner Jacob Ruppert.

The current-day site of Central Academy of Excellence, Casey Stengel's old high school, is seen in Kansas City, Mo. on Sunday, April 3, 2016. Photo Credit: Newsday / Neil Best

That was because the Yankees had established an affiliation with the Blues, which also is why on June 12, 1939, Lou Gehrig played the last baseball game of his life there.

advertisement | advertise on newsday

Perhaps you thought that happened on April 30, when he went 0-for-4 at Yankee Stadium in his 2,130th consecutive major league game. Not so.

After a game in St. Louis the Yankees visited Kansas City to take on the Blues and Gehrig played three innings aT first base, grounding out to second in his one at-bat.

From there he left the team and visited the Mayo Clinic in Minnesota, where his amyotrophic lateral sclerosis was diagnosed.

The 1939 Blues featured 21-year-old Phil Rizzuto at shortstop and Vince DiMaggio in centerfield. They went 107-47 and are considered one of the best minor-league teams in history.

A Monarch Plaza sign is seen at the site of the old Municipal Stadium in Kansas City, Mo. on Sunday, April 3, 2016. Photo Credit: Newsday / Neil Best

The old ballpark was drastically renovated and expanded – and renamed Municipal Stadium – for the 1955 arrival of the Athletics from Philadelphia, whose owner, Arnold Johnson, had strong business ties to Yankees ownership.

Baseball videos

For much of the Athletics’ 13 seasons in Kansas City before they departed for Oakland, they were accused of acting as a de facto Yankees farm team, making a series of seemingly lopsided trades in the late 1950s.

The most notorious of them delivered Roger Maris to the Bronx just in time to win back-to-back American League MVP awards in 1960 and ’61.

Municipal Stadium was home to the Royals for their first four seasons, 1969-72, where one of their stars was Amos Otis, whom the Mets had sent west in an unfortunate trade for Joe Foy.

The Royals moved into their current home in 1973, and Municipal Stadium – also the Chiefs’ old home, and the site of an early Beatles concert – was torn down in 1976.

A plaque of former Met Amos Otis is seen at the site of the old Municipal Stadium in Kansas City, Mo. on Sunday, April 3, 2016. Photo Credit: Newsday / Neil Best

There still is a small open grass area at the stadium site, parts of which have had homes built on it. Near where home plate rested there is a small plaza with monuments to former Athletics, Royals and Monarchs stars.

advertisement | advertise on newsday

The site is a couple of blocks from the famed Arthur Bryant’s barbecue restaurant, a favorite of fans and players in the old days that has become a Kansas City tourist attraction in the post-stadium era.

In the 1970s and ‘80s the Yankees and Royals became fierce rivals, and now here it is 2016 and the Mets are back in town with unfinished business from five months ago.

First, though, one more New York connection must be mentioned. In 1945, Jackie Robinson played for the Monarchs before Branch Rickey signed him to a historic contract with the Dodgers.

And that plaza memorializing the stadium where he played? It sits at the corner of 22nd Street and . . . Brooklyn Avenue.