The brick wall at Oracle Park in San Francisco didn't exactly benefit its own home team on Wednesday.

Tampa Bay Rays' Luke Raley took advantage of the funky wall Barry Bonds cleared so many times for an inside-the-park homer after a bizarre bounce.

Up 5-0 in the top of the sixth, Raley took a breaking ball from Ross Stripling deep into right-center field, probably expecting a double. But he'd find out quickly he could run for days.

CLICK HERE FOR MORE SPORTS COVERAGE ON foxnews.1eye.us

Luke Raley running

Luke Raley of the Tampa Bay Rays rounds the bases to score after hitting an inside-the-park home run in the top of the sixth inning against the San Francisco Giants at Oracle Park on August 16, 2023, in San Francisco. (Lachlan Cunningham/Getty Images)

The ball hit the angled brick wall and then hit the top of the matted fence some 400-plus feet away, a bounce that Giants center fielder Wade Meckler did not see coming.

Meckler tried to readjust his footing before the ball could travel farther from him to try to hold Raley from advancing beyond second, but when he stumbled on the warning track, scorekeepers began writing "HR" in their books.

By the time Meckler recovered the ball all the way back out in center field, Raley had already touched third and was heading the final 90 feet home. He scored before the ball could even get back into the infield, and it was a 6-0 Tampa Bay lead.

Luke Raley after inside the park homer

Luke Raley of the Tampa Bay Rays celebrates as he crosses home plate after hitting an inside-the-park home run in the top of the sixth inning against the San Francisco Giants at Oracle Park on August 16, 2023, in San Francisco. (Lachlan Cunningham/Getty Images)

The Rays would hold on to win, 6-1.

The Rays have stumbled over the last month, going 11-16 since July 18 when they were a season-high 14 games over .500. They still hold a wild-card spot, but their recent skid has them safe by just a game.

Meanwhile, the Giants' division rival Los Angeles Dodgers have won nine games in a row, giving them a 9.5-game cushion for the NL West lead.

It was a much-needed win for the Rays, who have come back to earth after a hot start to the season.

Tampa Bay started the season by winning its first 13 games and went 30-9 in its first 39. Since then, the Rays are 43-41.

Luke Raley high fives teammate

Luke Raley of the Tampa Bay Rays celebrates as he crosses home plate after hitting an inside-the-park home run in the top of the sixth inning against the San Francisco Giants at Oracle Park on August 16, 2023, in San Francisco. (Lachlan Cunningham/Getty Images)

CLICK HERE TO GET THE FOX NEWS APP

On June 30, they were a season-high 29 games above .500 at 57-28. In July, their 8-16 record was the second-worst in the majors, and since July 1 they are 16-22. They also just lost their ace in Shane McClanahan to Tommy John surgery.