Japan won the WBSC Premier12 title ©Getty Images

Japan produced the ideal warm-up for next year’s baseball competition at Tokyo 2020 as they beat South Korea to become global champions at the World Baseball Softball Confederation Premier12 event.

The host nation recorded a 5-3 win to clinch the title in front of 44,960 fans at the Tokyo Dome.

Earlier in the day Mexico had qualified for the Olympics for the first time in history after beating the United States 3-2 in the third-place play-off.

Both finalists had already secured Tokyo 2020 qualification - Japan as hosts, and South Korea as Asia/Oceania representatives – but there was a huge amount of pride at stake and in the end it was the hosts who earned the bragging rights.

South Korea had to overcome an early deficit in the final as first baseman Yamada Tetsuto put Japan ahead in the bottom of the second with a three-run homer.

Six pitchers limited South Korea to three hits over the course of eight innings.

Japan's Suzuki Seyia was named as the tournament's Most Valuable Player.

For Japan's manager Atusnori Inaba it was a first title in his current position.

"Since I became manager of the Japanese National Team two years ago our goal has been to win the Premier12 and the Olympics next year," Inaba said.

"I think all the players in our team had the same determination to become world number one.”

Mexico earned a place at next year's Olympic Games in Tokyo with their win over the US.

Matthew Clark's solo homer for Mexico at the bottom of the ninth tied the bronze medal match 2-2, sending it to extra innings.

Efren Navarro's single to centrefield at the bottom of the 10th drove home the winning run to seal the central American country's Olympic berth.

Israel will also make their baseball debut at the Games after they secured an Olympic place at last month’s Africa/Europe qualifier.

The two remaining Olympic places will be won in March next year - one at an Americas qualifying event in Arizona, and the other at a Final Qualifying Tournament in Taipei City.

Taiwan finished fifth in the standings at the Premier12 event, with Australia sixth.