BRISBANE, Australia (AP) — Australia ended a two-year losing streak against New Zealand by beating the world champions 23-18 Saturday in the third Bledisloe Cup test at Suncorp Stadium.

After the crushing disappointment of losing the second test despite leading with only three minutes remaining, the Wallabies scored three tries to two to beat the All Blacks for the first time since 2015 - 805 days ago.

New Zealand led 13-12 at halftime but a try to winger Marika Koroibete and two long-range penalties to winger Reece Hodge, who also scored Australia's first try, carried the Walalbies to victory in front of 45,000 fans.

The All Blacks threatened to steal the game again with a late try to Rieko Ioane but Damian McKenzie's sideline conversion sailed wide of the posts. Hodge made the game safe with his second penalty from more than 50 meters.

New Zealand dominated the first half but the Wallabies pounced on two All Blacks errors to score tries which kept the game close at the break.

Hodge intercepted a wayward pass from stand-in flyhalf Lima Sopoaga and dashed 70 meters to give Australia the lead after only seven minutes.

The All Blacks struck back with a try to winger Waisake Naholo in the 14th minute and Sopoaga added the conversion and a penalty to give New Zealand the lead, 10-7, after 25 minutes. A further penalty put the All Blacks ahead 13-7 after 30 minutes.

But a poor tactical kick from Sopoaga fueled a Wallabies counter-attack just before halftime and fullback Israel Folau scored to bring the Wallabies within a point. Bernard Foley missed a conversion which would have sent Australia to the break with a lead. On a poor night, Foley missed two conversions and two penalties to cost the Wallabies valuable points.

The match turned in Australia's favor throughout the second half. The hosts began to play with more confidence and composure, holding the ball for long periods in All Blacks territory. New Zealand, in turn, began to make mistakes both forced and unforced, and conceded a series of penalties that allowed Australia to gain parity and then take charge of the match.

Koroibete's try in the 56th went unconverted but gave Australia the lead at 17-13. Hodge then stepped up and landed a penalty from 48 meters in the 63rd minute, widening the margin to seven points.

Ioane's try brought New Zealand within two points and McKenzie's missed conversion cost the All Blacks a chance to level the scores.

New Zealand surged into attack in the final minutes and threatened to snatch victory with a late try. But further errors, especially a misjudged grubber kick by Sonny Bill Williams, allowed the Wallabies to hold on and Hodge added a second penalty to give his teammates a little breathing space.

New Zealand had a last chance to attack from a lineout with a minute remaining. They set up a dangerous rolling maul but flanker Sam Cane — perhaps its best player — dropped the ball and allowed referee Wayne Barnes to blow the final whistle.

The Wallabies were determined to prove on Saturday that they had improved since losing to New Zealand 54-34 at Sydney in the first test of the series more than a month ago. They should have won the second match in Dunedin, leading in sight of fulltime only to concede a late try and to go down 35-29.

On Saturday they avoided a similar, heartbreaking defeat.

"It is very sweet," Wallabies captain Michael Hooper said. "I'm feeling very satisfied with the growth in our game, the growth in our belief to take these guys down tonight.

"We didn't win any competitions tonight but we built an amazing amount of confidence."

Hooper said Folau's try, just before halftime, was "pretty pivotal," keeping Australia in the match just as the All Blacks seemed about to take control.

"That was pretty critical at the back end of the half just to pour pressure back on New Zealand and go into the half with them thinking a lot," Hooper said.

The match was fast-paced in the first half, less so in the second when both teams sought to play with more structure. It also featured some ferocious collisions and the All Blacks, especially, pulled off a number of bone-jarring tackles. Cane, captain Kieran Read and Williams were especially effective in that area.

"That was a bloody tough test match, the conditions dictated that," Read said. "These were two teams who probably would have liked to throw the ball around a bit more than we did.

"The Wallabies were a little bit better than us tonight ... two errors and the Wallabies scored two tries. We weren't out of it but we just didn't quite nail our chances tonight."