DETROIT — David Ortiz had a pinch-hit homer in the ninth inning off Jose Valverde to give the Boston Red Sox a 4-3 victory over the Detroit Tigers in the opener of today’s day-night doubleheader.

Ortiz, pinch-hitting for Jarrod Saltalamacchia, worked a full count against the Tigers’ closer, then hit a line drive over the scoreboard in right-center.

Boston has won 13 of 15, including five in a row. They will go for a sweep of their four-game visit to Detroit in the nightcap, with aces Josh Beckett and Justin Verlander pitching. The game will be televised on NESN.

Matt Albers (1-2) picked up the win with two shutout innings of relief, while Valverde (2-2) took the loss. Jonathan Papelbon pitched a perfect ninth for his 10th save.