ANAHEIM, Calif. -- Hector Santiago, once mired in an early-season funk, made a major contribution to the Los Angeles Angels' playoff hopes Wednesday night.

The left-hander earned his second victory as a starter this season, and the Angels defeated the Miami Marlins 6-1 at Angel Stadium.

Los Angeles, which earned its third victory in four games, remains one game ahead of the second-place Oakland Athletics in the American League West.

Santiago, who lost his first seven decisions, improved his season record to 4-7. He conceded just three hits, two walks and one run while striking out six in 5 2/3 innings.

"Everything was working: cutter, slider, changeup, screwball, sinker, fastball," said Santiago, whose last victory came in relief July 31. "Throwing everything for a strike, that was the important part."

Los Angeles manager Mike Scioscia offered a more detailed analysis.

"Early on, I thought he really changed speeds well," Scioscia said. "I thought he had good life on his fastball and great command. He got it by some good hitters and finished strong."

Center fielder Mike Trout hit his 30th home run to tie his career high from his rookie season, 2012. Trout joined Jimmie Foxx, Ted Williams, Jose Canseco and Alex Rodriguez as the only players in American League history to hit at least 30 homers twice at age 22 or younger.

"It's always cool to reach 30, but we've got other things on our minds," Trout said, referring to the Angels' hopes of winning the American League West.

Trout entered Tuesday night's game in a 5-for-26 slump. However, in the past two games, he went 5-for-7 with a double, a home run, three RBIs and four runs.

"I feel good at the plate," Trout said. "I'm not chasing too many pitches. When I get in trouble, I get anxious and I chase. But in the last couple of games, I'm feeling good."

Trout's homer, a seventh-inning drive into the cypress trees in center field, chased Miami starter Henderson Alvarez.

Alvarez (10-6) induced 13 groundouts, struck out three, hit one and walked just one in 6 1/3 innings. However, the right-hander allowed five runs on eight hits as his four-game winning streak ended.

With the loss, the Marlins fell five games behind the San Francisco Giants in the chase for the National League's final wild-card spot.

"We understand that, with a month to go, we've got to step it up," Miami manager Mike Redmond said. "We've got to be able to win games against playoff-caliber teams."

The Marlins took a 1-0 lead when shortstop Adeiny Hechavarria hit his first home run of the season in the top of the third inning. On a 3-2 count, Hechavarria sent a 92 mph fastball over the center field fence.

The Angels moved ahead in the bottom of the third by turning four hits into three runs against Alvarez.

Second baseman Gordon Beckham hit an infield single, moved to third base on a hit-and-run single from right fielder Kole Calhoun and tied the score when Trout lined a single to right field.

Calhoun went to third on Trout's hit and scored when first baseman Albert Pujols grounded out. Left fielder Josh Hamilton then pounded a double off the top of the center field fence to bring home Trout.

"These guys grind you out," Redmond said. "When you get two strikes on them, they battle and put the ball in play. They have speed. They have power. They've got it all."

In the fourth, Beckham hit his eighth home run of the season and his first since the Angels acquired him Thursday from the Chicago White Sox. Beckham dispatched an 82 mph curveball into the Marlins' left field bullpen.

The Marlins brought the potential tying run to the plate in the sixth after first baseman Jeff Baker singled and right fielder Giancarlo Stanton walked with two outs. Right-hander Kevin Jepsen relieved Santiago and ended the threat by inducing center fielder Marcell Ozuna to ground out.

After Trout's seventh-inning homer, Los Angeles scored its final run in the eighth. Beckham's groundout brought home third baseman John McDonald, who reached base on right-hander Steve Cishek's fielding error and moved to third on an error by third baseman Casey McGehee.

NOTES: Wednesday night's game was the Angels' last at home against competition outside of the American League West. ... Before Wednesday's loss, Miami owned the best interleague record among National League teams this season, 13-7. ... The Marlins have not been shut out in 58 consecutive games, the longest active streak in the major leagues. ... After going 1-for-4 Wednesday, Marlins LF Christian Yelich is hitting .351 (34-for-97) this month. ... Angels CF Mike Trout, by hitting his 35th double of the season Tuesday night, joined Joe DiMaggio, Orlando Cepeda, Alex Rodriguez and Albert Pujols as the only players in major league history who twice compiled at least 35 doubles and at least 25 home runs in a season before turning 23. ... Commissioner Bud Selig, who is in his final season on the job, attended the game. ... The announced attendance was 34,657.