The Cleveland Indians are staying home for the first round of the postseason — and the New York Yankees are coming to town.

Carlos Santana had four RBI and delivered a go-ahead, two-run double in the seventh inning as the Indians rallied for an 8-6 win over the Pittsburgh Pirates on Sunday to gain home-field advantage for their AL wild-card series.

Cleveland (35-25) finished second in the Central and grabbed the No. 4 seed in the American League playoffs when the Chicago White Sox lost to the crosstown Cubs.

“We feel proud of our city and we wanted to play here,” Indians designated hitter Franmil Reyes said. “We want to give the city of Cleveland what they deserve, which is to keep winning and a championship.”

The Indians, who won seven of their last eight games, host the Yankees in a best-of-three series beginning Tuesday. The opener features a prime pitching matchup, with Cy Young Award favorite Shane Bieber set to face New York ace Gerrit Cole.

James Karinchak (1-2) struck out all three batters he faced in the seventh for his first win in the majors. Hand got four outs for his AL-high 16th save in 16 opportunities.

Ramirez, a leading AL MVP contender, doubled twice and scored two runs. He batted .442 with six homers and 18 RBI over the final 12 games.

“Jose, that’s my MVP there,” Reyes said. “The way he carried us at the end was big. Really big, big for the team.”