BOSTON — Wade Miley is the one being tasked with making sure that the Baltimore Orioles keep going in the right direction after a pair of surprisingly easy victories against the Boston Red Sox.

Miley opposes Boston’s Doug Fister in Sunday’s series finale between the American League East rivals at Fenway Park after the Orioles outscored the Red Sox 23-3 while taking the first two games of the set.

Baltimore (64-65) is still a long shot to win the AL East crown, trailing division-leading Boston (73-56) by nine games, but the Orioles are now well within striking distance for a wild-card spot.

After Saturday’s 7-0 victory, the Orioles were within two games of the second AL wild-card spot, although Baltimore still has four teams to leapfrog to get there.

“We have to win games like [Saturday],” Orioles pitcher Kevin Gausman said after throwing 8 2/3 scoreless frames. “You get a lead early, you’ve got to be able to kind of shut the door.”

Boston’s lead atop the AL East shrunk to 3 1/2 games after the New York Yankees’ 6-3 win against the Seattle Mariners on Saturday.

Miley (7-10, 5.11 ERA) knows a thing or two — for better or worse — about pitching at Fenway, having spent the 2015 season with the Red Sox before trades to the Seattle Mariners and Baltimore Orioles.

The veteran southpaw is 7-6 with a 4.82 ERA over 15 career starts at Fenway Park but 1-1 with a 7.56 mark in two prior starts against the Red Sox.

Miley’s most recent visit to Fenway was unceremonious as he was hit hard for six runs on eight hits in a 1 1/3-inning outing that resulted in his 13th and final loss of the 2016 campaign Sept. 12.

While he may be on the way to another 13-loss season, Miley’s numbers in August have been encouraging. He is 2-1 with a 2.78 ERA through his first four starts of the month.

Miley has faced the Red Sox once this season, tossing seven one-run innings while allowing five hits and a walk with three strikeouts in a victory in Baltimore on June 1.

Newly acquired Red Sox outfielder Rajai Davis has a decent track record versus Miley. Two of Davis’ four hits opposite Miley have been home runs, and he has five total RBIs against him.

Hanley Ramirez (6-for-28, four RBIs), Mitch Moreland (2-for-4, two RBIs) and Eduardo Nunez (2-for-8) each have one career homer versus Miley.

Fister (3-6, 4.78 ERA) has turned around a disastrous start to his Red Sox career and picked up wins in three of his last four starts, including a complete-game, one-hit gem against the Indians in Cleveland on Tuesday.

The right-hander allowed one run on a first-inning solo homer and struck out six on the way to a 9-1 victory.

“He was outstanding,” Boston manager John Farrell said. “The third pitch of the game gets hit out of the park for a home run, and after that, he pitched nine no-hit innings. A very impressive outing.”

Fister is 3-1 with a 3.62 ERA since joining the rotation following David Price’s most recent elbow injury. He is 4-2 with a 4.47 ERA in nine career outings (eight starts) against the Orioles.

Seth Smith is 2-for-12 with two home runs and four RBIs and Chris Davis is 5-for-15 with two homers and three RBIs lifetime versus Fister.

Manny Machado (4-for-8) has a pair of solo homers opposite Fister.