SCOTTSDALE, Ariz. -- Tim Lincecum had his next-to-last tune-up before the start of the regular season on Wednesday as the Giants lost to the Angels, 5-3, at Scottsdale Stadium.

Alexi Amarista snapped a ninth-inning tie for the Angels with a bases-clearing triple off Giants reliever Javier Lopez.

The right-handed Lincecum worked five innings of five-hit, two-run ball, walking two and striking out a pair. He was virtually matched by Angels left-hander Brad Mills, who allowed two runs on four hits with a pair of walks and whiffs in his six innings. The two runs were the first Mills has allowed in 14 2/3 spring innings.

Lincecum, the former two-time National League Cy Young Award winner, is slated to start on Opening Day for the Giants against the D-backs at Chase Field on April 6. Mills, who is still vying for the fifth spot in the Angels' rotation, is probably ticketed to start the season in the Minor Leagues.

It was the first time Lincecum has been paired with Buster Posey since the catcher broke his left leg and tore ligaments in his ankle in a collision at the plate last May 25. Posey missed the remainder of the season, but started consecutive games for the first time this spring.

"It was great getting back out there and throwing to him again outside of a bullpen," Lincecum said about Posey. "Obviously a game atmosphere makes it more fun and a little bit more realistic. You're dealing with runners and throwing guys out, that kind of thing. It put it back in your head what he's capable of doing as well."

Angels catcher Bobby Wilson drove in both runs off Lincecum, with a third-inning double and a fifth-inning single. The Giants tied the score at 2 off Mills in the bottom of the sixth on back-to-back doubles by Pablo Sandoval and Aubrey Huff.

Up next for Angels: Dan Haren, who has given up just three runs in 15 Cactus League innings, will get the start opposite Bronson Arroyo when the Angels travel to Goodyear to face the Reds at 1:05 p.m. PT on Wednesday. With the Reds utilizing the designated-hitter rule, Kendrys Morales is also expected to be in the starting lineup for the Angels. Jason Isringhausen, LaTroy Hawkins and Kevin Jepsen will pitch in relief.

Up next for Giants: They play their only game of the spring at Scottsdale Stadium against the archrival Dodgers in a 1:05 p.m. PT start on Wednesday. It's Yusmeiro Petit for the Giants against Nathan Eovaldi for the Dodgers in a battle of right-handers. Petit is slated to start the season at Triple-A Fresno. Closer Brian Wilson is supposed to make his next appearance in the game.