The leadup to the third test between Australia and Pakistan at David Warner’s home Sydney Cricket Ground was always going to be about the opening batter himself playing his final test in the sport’s traditional format.

Warner has helped to hype what amounts to a match with little really on the line for the home side — Australia has already clinched the three-test series with victories in Perth and Melbourne. The visitors still have something to play for — the last time Pakistan beat Australia in a test Australia was 1985 — at the SCG.

Warner announced during a New Year’s Day news conference that he will also add one-day internationals to his retirement list. But in typical Warner fashion, he said he’d make a comeback at the 2025 ICC Champions Trophy if asked.

He said the time was right to conclude his ODI career following Australia’s recent World Cup triumph in India, where he was the champion team’s leading run-scorer.

Warner will continue to play Twenty20 cricket for Australia, at least until T20 World Cup in the United States and Caribbean in June.

“It was a (ODI) decision that I was very, very comfortable with,” the 37-year-old Warner told Australian Associated Press. “To win in India, from where we were, was absolutely amazing.”

Australia lost two early games in the group stage of the World Cup, denting its title hopes, but Warner said it helped inspire the squad.

“The bond just got stronger with each other and it’s not by fluke or by chance that we were able to get to where we were,” he said.

In 111 test matches Warner has accumulated 8,695 runs at an average of 44.58, including 26 centuries and a career-high score of 335 not out, scored against Pakistan in 2019.

Warner retires from the 50-over format as the sixth-highest run-scorer in Australian ODI history, having scored 6,932 runs from his 161 matches, and a two-time World Cup winner. His 22 ODI centuries are the second-most by any Australian ODI player, behind only Ricky Ponting, who made 29 in 105 more innings than Warner played.

The Champions Trophy, set to be played in Pakistan next year, is among the only pieces of silverware missing from Warner’s resume; the last time Australia won it in 2009, he was not yet a certainty for selection in the starting side.

“If I’m playing decent cricket in two years’ time and I’m around and they need someone, I’m going to be available,” he said.

Warner said the decision to quit ODIs would create more opportunities to play franchise cricket overseas, including in the United Arab Emirates-based ILT20. He is also eager to remain in Australia’s Big Bash League after his contract with the Sydney Thunder expires at the end of this season.

Warner will have a commentary role with Fox Sports television later this year but beginning Wednesday he will again open the batting for an Australian lineup aiming for a test sweep of Pakistan.

On Tuesday, Warner took to social media to plead for the return of his “baggy green” test cricket cap which was in a bag that went missing in transit between Melbourne and Sydney this week.

“It’s sentimental to me. It’s something I’d love to have in my hands walking out there this week,” Warner said in the post on Instagram.