STOCKTON – A day after learning who their first-round opponent would be in the 2018 Cal League Playoffs, the Stockton Ports were nearly shut out by that very team Sunday evening at Stockton Ballpark.

The Ports narrowly avoided their 14th scoreless game of the season after finding themselves losing by 10 runs before scoring twice in the bottom of the ninth. Visalia’s 10-2 victory in front of 2,330 fans gave it a 14-12 season-series lead over Stockton with one game remaining in the regular season.

Tonight’s game between the two teams begins at 6:10 p.m. The Ports, who won the first half title, can also claim the second half title with a victory tonight against the Rawhide. Visalia will be Stockton’s opponent for Game 1 on Wednesday regardless of tonight’s outcome.

The Ports are expected to send out pitcher Grant Holmes, the 22nd overall pick in 2014 by the Dodgers. The Oakland A’s acquired him in a 2016 trade that sent Josh Reddick and Rich Hill to Los Angeles. At spring training this year, it was revealed Holmes had a rotator cuff injury. He returned Wednesday to throw three innings for the Ports in San Jose where he allowed one run on one hit with four strikeouts.

On Sunday, the Rawhide (32-37 second half, 69-70 overall) burst out to a 4-0 lead in the top of the first inning as Stockton (33-36, 77-62) pitcher Xavier Altamirano allowed his first four batters to reach base on a single, a double, a hit batsman and a home run.

Altamirano, making his thirteenth start of the season, allowed seven runs on seven hits with three walks and four strikeouts over four innings. The outing was a stark contrast to Monday’s effort at Visalia when he earned the win by giving up two runs over six innings.

Altamirano, drafted in 2015 by the Oakland A’s in the 27th round out of Oral Roberts University, began this season in Low-A Beloit and was a Mid-West League All-Star. His record fell to 5-6 with 6.62 ERA.

Meanwhile, Visalia starter Cole Stapler picked up his first win of the year after starting the year 0-7 with an ERA of 4.80. Stapler had a perfect game into the third inning before No. 9-hitter Santiago Chavez singled up the middle with two outs.

When Brallan Perez and Chase Calabuig subsequently walked to load the bases, Luke Persico had a chance to put the Ports back into the game. However, on a full count, Persico, who was 4-for-19 with the bases loaded this season, smashed a hard hit directly to the center fielder to dash Stockton’s hopes.

The Rawhide pushed the lead to 9-0 by the seventh inning as Visalia two runs home in each of the fifth and sixth innings. It could have been more had the Ports not produced a double play with the bases loaded.

Stapler, who was drafted in the 22nd round by Arizona in the 2017 draft, continued to keep the Ports at bay. He exited after sixth innings with no runs on three hits, two walks and five strikeouts. In contrast to his last start at home Monday against the Ports, Stapler allowed four runs on eight hits over seven innings.

Visalia’s final run occurred in the seventh inning when Jazz Chisholm earned his third RBI with a single. His two-run homer in the first inning were part of a 3-for-4 night at the plate.

Stockton got its two runs in the bottom of the ninth inning with two outs when Edwin Diaz and Brett Siddall each singled to score teammates Viosergy Rosa and Greg Deichmann.