Updated

Ervin Santana had his parents in the stands for the first time all season, and he took the mound with confidence after a pep talk from an old teammate.

No wonder Santana dramatically turned around a rocky season with a performance that put his name next to Nolan Ryan in the Los Angeles Angels' record book.

Santana took a perfect game into the seventh inning before finishing with a one-hitter, and Mark Trumbo hit a two-run homer in the Angels' 2-0 victory over the Arizona Diamondbacks on Saturday night.

Santana (4-7) bounced back from several rough outings by retiring Arizona's first 20 hitters before Justin Upton's two-out single to center in the seventh.

The Dominican right-hander then retired the next five Diamondbacks before pinch-hitter Miguel Montero drew a four-pitch walk in the ninth. Santana finished up his first complete game of the season with two fly balls, getting a standing ovation and praise from his teammates.

"That was very good — very, very good," Santana said. "When you pass the sixth and nothing is happening, you have to think about it a little bit, but you just have to re-focus and keep pitching, and that's what I did."

And how: After Upton's hit, Santana completed his seventh career shutout and 14th complete game with just one more baserunner. With the 18th individual one-hitter in club history, Santana joined Ryan as the only pitchers to throw a no-hitter and a one-hitter for the Angels.

"It just felt like no matter what (fingers) I put down, they weren't going to hit it," said John Hester, the Angels' backup catcher. "It was hard not to think about (a perfect game), because you could tell he was throwing something special tonight."

Staked to a lead by Trumbo's 15th homer in the first, Santana had allowed nothing even close to a hit before Upton's clean single back up the middle. The Angel Stadium crowd of 42,483 responded with a standing ovation for a pitcher who bounced back from a lousy four-game stretch with a start that nearly equaled his no-hitter last July 27 in Cleveland.

Joe Saunders (4-5) allowed eight hits in six innings while facing the Angels for the first time since they traded him to Arizona in 2010. Saunders mostly kept pace with Santana, his longtime teammate and good friend, after a rough first inning, but the Diamondbacks were shut out for the third time in 11 games.

Saunders and Santana came up together through the Angels' farm system, both reaching the majors for the first time in 2005 and pitching in the same rotation for 4½ years. They even made the AL All-Star team together in 2008.

"I talked to him (Friday) and said, 'Keep your head up, keep doing your thing,'" Saunders said. "I guess I had some real good advice. He really had it going."

Howie Kendrick and Torii Hunter had three hits apiece for the Angels, who won for the sixth time in eight games despite stranding 10 runners and failing to score after the first inning. Their 17th victory in 23 games moves them back to a season-best four games over .500.

Just three days after San Francisco's Matt Cain threw the 22nd perfect game in major league history, Santana got within seven batters of the sixth no-hitter and third perfect game in a season that isn't even half over yet. The Angels already had their first no-hitter in 21 years when Jered Weaver blanked Minnesota on May 2.

After starting the season with abysmal run support, Santana returned to top form after a rough four-start stretch in which he allowed 27 hits and 23 runs in just 20 1-3 innings. The veteran has struggled with fastball control throughout the season, continuously falling behind hitters, but took control early against the Diamondbacks and never relented.

"He's as competitive as any pitcher in baseball, and you saw that," Angels manager Mike Scioscia said. "He pitched with purpose, and it all goes along to committing to a game plan. If he commits, that's what he can do."

Trumbo connected on a full-count curveball from Saunders, putting it into the bullpen behind the left-field wall. The sophomore slugger is having another outstanding season despite losing his rookie spot at first base to Albert Pujols, ranking among the AL leaders in batting average while producing stellar power numbers.

"(Santana) had everything working," Arizona manager Kirk Gibson said. "The early homer by Trumbo gave him confidence. Joe pitched a great game for us, battled his tail off, and really only made one mistake."

Pitching on his 31st birthday, Saunders settled down for a strong effort in his first start in Anaheim since the Angels traded their former first-round pick in 2010. Saunders started 115 games and earned 54 wins over parts of six seasons with the Angels before he left with three other players in a deal for right-hander Dan Haren, who also lost his first reunion start against Arizona on Friday night.

NOTES: Weaver will throw 30-40 pitches in a bullpen session Sunday as he moves closer to a return from the disabled list. ... Jerry Dipoto, the interim Arizona general manager who acquired Saunders, now runs the Angels. ... RHP Ian Kennedy takes the mound in Sunday's series finale against Angels youngster Garrett Richards.