National High Five Day is Thursday, April 18.

The first-ever high five appears to have happened in 1977, during a baseball game between the Los Angeles Dodgers and the Houston Astros.

After a home run, Dodgers outfielder Dusty Baker high-fived his teammate, Glenn Burke.

Burke was openly gay among his teammates, and after he was traded to the Oakland Athletics and became an icon in the gay community, the high five became a defiant symbol of gay pride in the Castro district of San Francisco.

Thursday is National High Five Day, celebrating one of the most ubiquitous hand gestures in the world.

But while plenty of people have high-fived before, few know the high five's surprising history.

There are various origin stories to the gesture, but the most widely accepted one pins the high five to a 1977 baseball game between the Los Angeles Dodgers and the Houston Astros.

It was the last game of the season, and Dodgers outfielder Dusty Baker had just hit a home run — his 30th of the season. The accomplishment made the Dodgers the first team in Major League history to have four players hit 30 homers.

Baker's rookie teammate Glenn Burke was waiting for him on deck, and as Baker crossed home plate, Burke triumphantly lifted his hands in the air.

"The way the legend goes … Glenn put his arm high in the air, and Dusty didn't know what to do, so he slapped it," Dodgers historian Mark Langill said in the ESPN documentary "The High Five."

Although slapping hands as a type of handshake dates back to at least the 1920s, there was something different about the way Burke and Baker did it that instantly caught the public's attention.

"It was such a moment. It was the energy of it, and it was just this explosion of emotion," Dodgers reporter Lyle Spencer told ESPN. "It was something just unique."

Jon Mooallem, a journalist who has documented the high five's history, relayed Burke's thoughts about the historic moment.

"The way he used to tell the story of that first high five with Dusty Baker, wasn't necessarily that he had innovated something, so much as that he was so overwhelmed with joy and pride of what Dusty had just done, that the high five came out of him, that Dusty had brought it out of him," he told ESPN.

From there, the Dodgers quickly adopted the high five as a symbol of team pride, and performed it regularly over the next few seasons, to the delight of the media and fans of the team.

A 1980 advertisement for the Los Angeles Dodgers boasts of the team's "high five salute" "Dodger Stadium," Mark Langill

Burke's tenure with the Dodgers was short-lived, however, and his demise is mired in controversy. Burke was openly gay among his teammates. In 1978, despite being an up-and-coming contributor to the team, he was traded to the Oakland Athletics. Some of Burke's teammates maintain to this day he was traded because of his sexuality.

In the Bay Area, Burke became an icon in the gay community, and he brought his famous high five with him. In San Francisco's Castro district, the high five became "a defiant symbol of gay pride," as Mooallem wrote for ESPN in 2011.

Burke received little playing time in Oakland, and fell out of the major leagues after five seasons. He died from complications from AIDS in 1995, at the age of 42.

Forty years after he helped invent the high five, his gesture remains a universal symbol of celebration.