MELBOURNE, AUSTRALIA - DECEMBER 09: David Warner of Australia bats during game three of the One Day International series between Australia and New Zealand at Melbourne Cricket Ground on December 9, 2016 in Melbourne, Australia. (Photo by Quinn Rooney/Getty Images)

Australian cricket superstar David Warner has officially announced he has retired from ODI cricket in the lead-up to his final Test match.

In a bombshell statement, the opening batter broke the news on Monday morning ahead of the third Test against Pakistan to round out the three-match series.

This comes after Warner is set to bow out from Test cricket at the conclusion of the Sydney Test this week.

In 161 one-day international matches, the former Australia vice-captain has scored 6,932 runs in the format and is presently the sixth-highest run-scorer in Australian ODI history.

"Also, on the back of that... I'm definitely retiring from one-day cricket as well," Warner said at a press conference on Monday.

"It's something I had said through the World Cup: get through that, and winning it in India is a massive achievement.

"I make that decision today to retire from those forms, which does allow me time to go and play some other leagues around the world and sort of get the one-day team moving forward a bit.

"I know the Champions Trophy is coming up... if I'm playing decent cricket in two years' time and if they need someone, I'll be available."

PERTH, AUSTRALIA - DECEMBER 18: Steve Smith and David Warner of Australia celebrate in the changerooms after Australia regained the Ashes during day five of the Third Test match during the 2017/18 Ashes Series between Australia and England at WACA on December 18, 2017 in Perth, Australia. (Photo by Ryan Pierse/Getty Images)

After confirming his future in the 50-over format, the 37-year-old disclosed that he almost decided to retire from Test cricket after the second Test at Lord's last year.

“It has actually become more emotional. When I looked at Lord's as a potential finish, I didn't really have many emotions because I was content," he added.

"But definitely it's been emotional since Perth. Since I've been back in Australia and knowing that I'm playing (my final Test)."

“Getting that 164 (in the first Test in Perth) … it hit home when people in the streets were coming up and saying, ‘well done, we support you, we back you.'

“It really means a lot. The emotions probably started then.”