SYDNEY — Mile Jedinak stepped up when it counted most, propelling Australia into next year’s World Cup with a hat trick Wednesday in a 3-1 victory over Honduras that secured the next-to-last spot in Russia.

The Australia captain was in doubt for the intercontinental playoff series with a groin injury that had forced him to miss the end of the Asian qualifying campaign, when the Socceroos narrowly missed out on direct entry.

But Jedinak played a full game in the 0-0 draw in San Pedro Sula last Friday and, aided by the state-of-the-art rehabilitation program on Australia’s charter flight home, took the free kick that broke the scoring drought in the 54th minute at Sydney’s Olympic stadium.

His free kick curled to the left of the wall and deflected sharply in off defender Henry Figueroa, bringing the parochial 77,060-strong crowd at Sydney’s Olympic stadium to life.

He converted from the spot in the 72nd after referee Nestor Pitana penalized Bryan Acosta for a hand ball and again calmly slotted home another penalty in the 85th after Robbie Kruse was dragged down in the area. After 22 games and 27 months, the win ensured Asian Cup champion Australia qualified for its fourth consecutive World Cup.

“It wouldn’t have mattered who scored. I’m happy to chip in,” Jedinak said. “We got the job done and that’s all that matters — it’s going to be a big 2018.”

Honduras scored a consolation goal deep in injury time in a scramble in front of goal with Alberth Elis and Maynor Figueroa both taking swipes at the ball from close range.

The result meant Asia got a full quota of five teams into the World Cup in Russia, with 31 of the 32 places decided. Peru was hosting New Zealand to determine the last qualifier later Wednesday.

Under-fire coach Ange Postecoglou said he was delighted for his Australian team, and declined to comment on his future amid speculation that he may not stay on to take them to the World Cup.

“They got what they deserved — it wasn’t by luck or by chance,” said Postecoglou, who took on the Australian job just before the 2014 World Cup in Brazil. “They believed in something that we started, and right to the end they displayed the kind of resilience and belief that has made me proud all the way along. They did it their way, and got great rewards for it.”

While the Australians invested heavily in the charter flight to get home Sunday after the first leg, the Honduras squad took a commercial flight and arrived a day later.

But with veteran skipper Maynor Figueroa returning, and with Elis adding pace on the flank, Honduras lifted its tempo in the first half and frustrated the Australian attack.

Honduras coach Jorge Luis Pinto said the Australians clearly worked to neutralize Elis out wide, and the momentum shift was too great after the opening goal.

“Australia were very strong and aggressive and put pressure on us. In the first half the game was more balanced — in the second half, the (first) goal took a toll,” Pinto said. “The second goal, there was contact with the player’s hand, but it wasn’t intentional.”

Honduras earned its place in the playoff with a 3-2 win over Mexico on a hectic last day of qualifying in North and Central America and the Caribbean, securing fourth spot and ensuring the U.S. missed out.

Australia advanced after beating Syria for fifth place in Asian qualifying, with veteran Tim Cahill scoring twice in Sydney.

Cahill was involved when Australia edged Uruguay on penalties in a playoff in 2005 to qualify for the following year’s World Cup in Germany. He was also there when the Australians qualified directly from Asia for 2010 and 2014. There is a good chance he’ll be in Russia, too, well after he has turned 38 years of age.

“To help my country qualify for four World Cups is something I will be proud of when I get … even older,” the former Everton player said. “I feel like a young kid. I would’ve done anything to be part of this group and I will do anything to stay a part of it.”