SAN FRANCISCO — Giants pitcher Madison Bumgarner wanted to waste a two-strike curveball in front of Rockies cleanup hitter Justin Morneau. He left the ball up just enough for Morneau to get a piece of it — the only mistake on an otherwise memorable night for the San Francisco left-hander.

Bumgarner pitched a one-hitter and matched his career high of 13 strikeouts, and the Giants beat the Rockies 3-0 on Tuesday night to snap a three-game losing streak.

The two-time all-star retired the first 21 batters before Morneau doubled down the right-field line to end the bid for perfection. That was the only base runner Bumgarner (15-9) gave up. He fanned the next three hitters.

His 103-pitch gem kept the Giants in a wild-card spot. It’s Bumgarner’s third career shutout and sixth complete game. He also became the first pitcher in franchise history with six games of 10-plus strikeouts with no walks.

Notes

• Red Sox slugger David Ortiz was out of the lineup for a second straight game, still bothered by a sore right foot.

• The Chicago White Sox activated outfielder Adam Eaton from the 15-day disabled list.

• The Detroit Tigers will have their pitching depth tested for at least a little bit longer now that Anibal Sanchez is dealing with a setback in his recovery from a right pectoral strain.

• Detroit claimed Houston Astros closer Chad Qualls on revocable waivers, giving the team until Wednesday to work out a trade for the veteran.

• The Kansas City Royals are skipping right-hander Yordano Ventura’s next turn in the rotation to rest his sore back, clearing the way for Liam Hendriks to make his first start for the club since arriving in a trade from Toronto.