Updated

Josh Hamilton took off running, and kept up that pace even after his first swing in six weeks for the Texas Rangers sent the ball over the wall for his first homer this season.

"It was good to get it out of the way, good to get that nervousness over," Hamilton said.

The Rangers have been waiting for their AL MVP and Nelson Cruz to get back in the lineup, and both delivered big blasts in a 4-0 victory over the Chicago White Sox on Monday night.

Cruz and Hamilton homered to back up Alexi Ogando's five-hitter for his first career shutout.

"An exciting moment for us to be back," Cruz said.

Their long-awaited comeback in many ways overshadowed another dominating pitching performance for the Rangers, who had their second consecutive shutout and third in eight games.

Hamilton pulled an 0-1 pitch off John Danks (0-7) over the right-field wall in the first to put Texas ahead to stay. Hamilton, who hit .333 without a homer in 11 games before breaking a bone in his upper right arm April 12, was quickly around the bases and back in the dugout.

"First one of the year, yeah!" he said. "I was already running hard because I didn't know if it was getting out or not, so I just continued it all the way around the bases. But it was good."

Cruz hit a two-run shot to left in the sixth to make it 3-0.

"That's something we needed," Ogando said through a translator. "You see as soon as they are at the plate they can make a big difference."

Ogando (5-0), who was added to the rotation at the end of spring training after Tommy Hunter's injury, struck out six and walked three while throwing 72 of his 105 pitches for strikes.

Danks also threw a complete game, his first this season and third of his career.

"I made a lousy pitch to pretty darn good hitter in the first, and I made a good pitch to Cruz that he hit out of the ballpark," Danks said. "It changes their lineup, no disrespect to their other hitters."

A setup reliever last season, Ogando was expected to pitch out of the bullpen again even though he was stretched in spring training.

Now Ogando has pitched at least six innings in nine consecutive starts to open the season, matching Kevin Millwood (2009) as the only Rangers pitchers in opening-day rotations to accomplish that over the past 10 seasons. And already has a shutout.

"You're never thinking about that, you can't predict the future," he said. "But if you work hard and do your job, anything can happen. ... I'm learning more every inning. I know that I'm getting more and getting more experience. I feel more confident every time I get out there."

Danks, drafted ninth overall by Texas in 2003 and traded to Chicago three years later, struck out three and walked two while 71 of 105 pitches for strikes. The left-hander again got no run support, with the White Sox scoring only four runs for him in his five road starts this season.

"He threw the ball well, but made a couple mistakes, missed his location a couple of times. He's giving up a lot of 0-2 hits on mistakes. It's almost like he's throwing too many strikes," catcher A.J. Pierzynski said. "It's frustrating for him, for me, for everybody because we know the ability John has and we want to get that out of him."

For only the fourth time in Rangers Ballpark, which opened in 1994, both starting pitchers threw complete games.

It was the fifth shutout for the Rangers this season. Chicago was held without a run for the sixth time after being scoreless only five times last season.

The game was played in 2 hours, 5 minutes — the shortest game at Rangers Ballpark since a 2-hour game on May 29, 2006, when Texas beat Seattle 2-0.

Hamilton and Cruz wrapped up rehab assignments Sunday at Triple-A Round Rock, and were activated before Monday's game.

The return for Hamilton came one day short of six weeks since he got hurt trying to score with a headfirst slide at Detroit. Cruz had been out since leaving a game early May 3 at Seattle because of a strained left quadriceps.

Hamilton, who was the designated hitter batting third, got a standing ovation when he was introduced in the first. He responded with his first homer, and later had a double while going 2 for 4.

Cruz got a similar response when he led off in the second, when he grounded out. He also struck out before his two-run blast in the sixth snapped an 0-for-16 slide.

After Adrian Beltre drew a two-out walk in the sixth, Cruz homered to left. Beltre added a sacrifice fly in the eighth.

Notes: When Pierzynski reached into the stands to try to catch a foul ball by Beltre in the sixth inning, he found himself face-to-face with former President George W. Bush. The ball didn't hit anyone when it fell into the owner's box where Bush and his wife, Laura, sat with Rangers president Nolan Ryan and his wife, Ruth. ... PGA Tour player Vijay Singh attended the game. He missed the cut at the Colonial in Fort Worth last week and is a former champion in this week's Byron Nelson Championship in Irving.