Last week’s U.S. Supreme Court ruling opening the door to state-sanctioned gambling on ballgames leaves many of us with a question: When it comes to sports, do we want to follow our money or our hearts?

Sports are built on emotion, are they not? Those kids out on the field – they represent our school, our city, our state, don’t they? And sports, we’ve always told ourselves, isn’t only about winning and losing. It’s about building character, about overcoming adversity, about every kid’s dream of sinking the winning shot at the buzzer as the crowd goes wild, right?

Well, what if the crowd’s busy phoning in their last-second bets as the winning shot goes through, and half their reaction’s a cheer – and half’s a groan?

Some of us worry that we’re headed in that direction with that high court ruling last week. We worry even as we utter a cheer for the decision. We understand that it’s hypocritical to have casino gambling and state lotteries and slot machines and thoroughbred horse racing, and yet outlaw betting on other sports.

And we understand the possible benefits for Pimlico Race Course – might this keep the track alive, if they converted it into a gambling mecca for college and professional sports, with televised ballgames airing there from all over the planet?

But what does this do to the raw passion at the heart of watching our favorite players in action? Do we now – with official government sanction – begin to cheat on our emotional commitment, our lifetime marital vows of sporting fidelity to home teams, because our money counts for more than our emotions?

Can’t you hear it now? “Yeah, it’s great that Machado hit that game-winning homer last night. But, hey, I had 10 bucks down on the Yankees winning that game.”

And let’s not forget the challenges to integrity this would present to all ballgames. The pros are already millionaires, so maybe they’re not so vulnerable to shaving points. But what about some college kid? Or some umpire or referee? The money’s going to be very tempting if they’re approached by some racketeer with deep pockets.

Here’s a brief history lesson for those who don’t remember the football game played 60 years ago between the Baltimore Colts and the New York Giants, known to many as “the greatest game ever played” – the 1958 NFL championship that went into Sudden Death overtime.

It was an open secret that the Colts’ owner, Carroll Rosenbloom, had bet many thousands of dollars on the game. In overtime, the Colts could have kicked an easy field goal but instead chose to go for a risky touchdown.

It did not go unnoticed that the betting spread on the game was 3½ points. In other words, if the Colts had kicked the field goal, they’d have won by 3 points – but Rosenbloom would have lost his bet.

The Colts always claimed the spread never affected their thinking. But such doubts about ballgames will inevitably grow as legalized betting spreads and the dollars multiply.

A former Baltimore Sun columnist and WJZ-TV commentator, Michael Olesker is the author of six books. His most recent, “Front Stoops in the Fifties: Baltimore Legends Come of Age,” published by the Johns Hopkins University Press, is now in paperback.