BOSTON — Boston Red Sox legend David Ortiz made a surprising and triumphant return to Fenway Park on Monday night, and the fans absolutely loved it.

As Kanye West's "Jesus Walks" was blasted throughout the ballpark, Boston welcomed the franchise Hall of Famer back with a 38-second standing ovation before he took the mound to throw out the ceremonial first pitch to former teammate Jason Varitek. Even rival Yankees players clapped along.

It was Big Papi's first public appearance since June, when he was shot and seriously injured in his native Dominican Republic. Law enforcement there said the incident, which was captured on video, was a case of mistaken identity.

RELATED: Dominican AG says Ortiz shooting was a result of mistaken identity
RELATED: David Ortiz shot in back, recovering after surgery

"Ladies and gentlemen, tonight we welcome home one of the most beloved people ever to wear the Red Sox uniform. In fact, he may be one of the most beloved people in the history of this city, his city, our city," the PA announcer said.

"Won't you please welcome the symbol of resilience, strength, triumph and love, our one and only Big Papi, Red Sox Hall of Famer No. 34 David Ortiz."

Papi jogged out of the dugout, hands spread out, gesturing his appreciation.

The left-handed pitch? Slightly up and in for a fellow lefty batter.

Ortiz and Varitek hugged it out before he was given a microphone. The 10-time All-Star and three-time World Series champ thanked everyone for their help.

"Good evening, good evening. Hey, first of all, I want to thank God for giving me a second opportunity in my life to be able to be here with all of you," Ortiz said. "I want to thank the Red Sox, my real family. They always have been there for me, supporting me. They were aware of what happened to me and they were the first one there supporting me. Thank you very much, Red Sox family."

"I want to thank all of you for all the prayers, all of them came home. I really appreciate it, thank you very much," he said. "I want to thank my former teammates for being there for me, also. All of them came home to check up on this boy. Also I want to thank the Yankees. A lot of my boys over there came and check up on Big Papi, thank you very much, I appreciate it. CC [Sabathia] and [Edwin] Encarnación and all y'all man, thank you very much."

Ortiz concluded his remarks with, "God bless you all. Go Sox!"

The Red Sox are well out of postseason contention, with current odds as of Monday of making an appearance at 0.4%, per FanGraphs.

The club parted ways early Monday morning with its president of baseball operations, Dave Dombrowski, who less than a year ago helped lead the team to a World Series title. He took Boston to three straight division titles.

RELATED: Red Sox part ways with baseball boss Dave Dombrowski

Monday's game concludes a four-game series with the AL East foe Yankees, who led two out of three. It's the final time the clubs will meet in 2019.

The Associated Press contributed to this story.