ANAHEIM, Calif. (AP) — After righting a road trip that nearly went terribly wrong, the Astros are cruising back home with plenty of chances to clinch a playoff berth while bringing a long-overdue division title to Houston.

Brad Peacock pitched six innings of three-hit ball and the Astros lowered their magic number for clinching the AL West to three with a 5-2 victory over the second-place Los Angeles Angels on Thursday night.

Yuli Gurriel had three hits and drove in a run for the Astros (88-58), whose 14-game lead over Los Angeles (74-72) puts them in prime position to clinch a playoff spot and their first division crown since 2001 in the next several days, possibly this weekend against Seattle (74-73).

An October run should be a welcome boost to hurricane-ravaged Houston, and the Astros' excitement was palpable while they packed up their gear at the Big A for the late-night flight home.

"We have a great opportunity ahead of us," Houston manager A.J. Hinch said. "Obviously we want to finish this out in front of our home fans as quickly as possible."

Gurriel and Alex Bregman drove in runs in the second inning, and Marwin Gonzalez added a two-run double in the eighth as the Astros wrapped up a 10-game road trip with five victories and kept cruising toward the postseason.

Houston bounced back from a sobering four-game sweep in Oakland last weekend by winning two of three in Orange County.

"We won the series against a good team," Hinch said. "And rarely do you go on a trip like we did, lose four in a row, and come out feeling as good as we do."

Albert Pujols hit his 613th career homer in the ninth inning, breaking his tie with Jim Thome for seventh place in baseball history. Luis Valbuena also hit his third homer in four games for the Angels, whose AL wild-card hopes are slipping.

Their loss clinched a playoff spot for the remarkable Cleveland Indians (91-56), whose 22 straight victories have vaulted them past Houston for the AL's best record.

"If they don't lose, they're not going to get caught," Hinch said with a shrug. "And they haven't lost in 3 1/2 weeks. We've got to get home, try to win our division, clinch a (playoff) spot, and then we'll worry about the best record later."