CLEVELAND — The Cleveland Indians stretched their franchise-record winning streak to 18 games, beating the Baltimore Orioles 3-2 Sunday night behind homers from Francisco Lindor and Roberto Perez.

Cleveland’s streak is the longest in the majors since Oakland won 20 straight in 2002.

The crowd of 21,259 roared in the ninth inning as Cody Allen recorded his 26th save. He struck out the first two hitters and retired Trey Mancini on a line drive to right field to end the game.

Cleveland hasn’t lost since Aug. 23 and has outscored its opponents 121-32 in the streak. Cleveland has trailed in only four of 162 innings during the stretch.

The best run in baseball history belongs to the New York Giants, who had a 26-game streak in 1916, according to the Elias Sports Bureau. The Giants’ streak included a tie, which doesn’t count as a game in baseball.

YANKEES 16, RANGERS 7: Aaron Judge became the second major league rookie with a 40-homer season going deep twice as AL wild card-leading New York won in Arlington, Texas.

BLUE JAYS 8, TIGERS 2: Teoscar Hernandez hit his first two home runs of the season, Darwin Barney had four hits and host Toronto beat Detroit.

ROYALS 11, TWINS 3: Jason Vargas snapped a personal four-game losing streak with his career high 15th victory and Kansas City won at home.

ANGELS 5, MARINERS 3: Justin Upton had a two-run double in the eighth inning to help Los Angeles avoid a sweep with a 5-3 win over host Seattle, moving the Angels one game out of the second wild card spot.

ATHLETICS 10, ASTROS 2: Dallas Keuchel walked in two runs and hit a batter to force in another during a shaky sixth, and Oakland completed a four-game sweep at home.

NATIONAL LEAGUE

NATIONALS 3, PHILLIES 2: Washington became the first team in the majors to clinch a playoff spot this season, winning the NL East as Stephen Strasburg extended his scoreless streak to a franchise-record 34 innings in a 3-2 win over Philadelphia, in Washington.

BRAVES 10, MARLINS 8: Rio Ruiz had a tying, two-run single with two outs in the ninth and Lane Adams hit a two-run homer in the 11th that gave host Atlanta a win.

ROCKIES 8, DODGERS 1: Mark Reynolds hit a grand slam as Colorado handed Los Angeles its 10th straight loss, in Los Angeles.

The losing streak is the longest in 25 years for the NL West-leading Dodgers.

CARDINALS 7, PIRATES 0: Yadier Molina hit a three-run homer and tied a career high with five RBI and St. Louis won at home.

BREWERS 3, CUBS 1: Travis Shaw hit a two-run homer to back Zach Davies, and Milwaukee won in Chicago to complete a three-game sweep and close within two games of the NL Central leaders.

DIAMONDBACKS 3, PADRES 2: Paul Goldschmidt homered on his 30th birthday and J.D. Martinez went deep twice, helping Robbie Ray and Arizona avoided a three-game sweep in Phoenix.

REDS 10, METS 5: Tucker Barnhart drove in five runs and Cincinnati scored eight runs on the final three innings to win in New York.

INTERLEAGUE

WHITE SOX 8, GIANTS 1: Jose Abreu hit two home runs and Carson Fulmer won his first major league game as a starter as Chicago won at home.