"To do that, you've got to have a good effort out of your bullpen -- and we did tonight,'' manager Buck Showalter said.

Orioles relievers gave up one run and five hits over the final seven innings.

After Ryan Webb (3-1) worked out of a two-on, two-out jam in the 12th, Machado took care of business in the bottom half with his first career walk-off homer. Machado hit a 1-2 breaking ball from Cory Rasmus (2-1) into the seats in left field to end the back-and-forth duel between AL contenders.

The Orioles were 16-2 in extra innings in 2012, and this is shaping up to be that kind of year.

"We have good chemistry in the clubhouse like we did back then, and obviously we have a good bullpen as well,'' Machado said.

Josh Hamilton homered and had three RBIs for the Angels, who have dropped eight of their past 11 against the Orioles. Los Angeles got a solid performance from its relievers, who allowed three hits over six-plus innings.

"Our bullpen did a terrific job,'' manager Mike Scioscia said. You can't ask much more from those guys. We couldn't get that one hit that would get the game on our terms.''

A potential pitching duel between Jered Weaver and Tillman turned into a slugfest, as both former All-Stars left after the fifth inning with Baltimore leading 6-5. Weaver gave up a season-high six earned runs and walked four. Tillman yielded five runs (three earned) and six hits, including three doubles and a home run.

After Hamilton delivered a run-scoring grounder in the top of the first, the Orioles scored twice in the bottom half. Jones drove an 0-2 fastball over the left-field wall -- giving him 20 home runs for a fourth straight season -- and J.J. Hardy added an RBI single.

Los Angeles capitalized on a throwing error by Tillman to take a 3-2 lead in the second before Machado doubled in a run in the Orioles' half. After Hank Conger hit a sacrifice fly for the Angels in the fourth, Weaver issued two walks in the bottom half, and Markakis followed with a drive off the right-field foul pole to make it 6-4. Hamilton homered in the fifth and tied it in the seventh with an infield hit.

WEAVER'S WOES

The Angels were 7-0 in Weaver's previous seven starts, and it took a comeback for the right-hander to stay unbeaten since June 16. "Fastball was up for most of the time, and I couldn't really figure out how to get it down,'' he said. "Every time I left it up, they put good swings on it. Any time you get the ball up in this park, it's not going to work out too well.''

TRAINING ROOM

Angels: Left-hander C.J. Wilson (right ankle sprain) pitched 5 1/3 innings for Double-A Arkansas on Monday night in his first rehab start and could return soon. "There is definitely one scenario where it could be this weekend, but we're not going to commit to anything,'' Scioscia said.

Orioles: First baseman Chris Davis did not play after being sent home with a stomach virus. "He was sick all day [Monday] and didn't seem to be making a marked improvement,'' Showalter said.

ON DECK

Angels: Right-hander Garrett Richards (11-3) seeks to rebound after his seven-game win streak was ended the past week against Detroit. In his only previous start against Baltimore, Richards allowed a career-high seven runs in 2012.

Orioles: Kevin Gausman makes his first career start against the Angels, while the Orioles seek their ninth win in 11 games at Camden Yards.