Daniil Medvedev survived a major scare as he prevailed 6-2 4-6 3-6 6-1 6-2 over Kasidit Samrej in a first-round thriller at the Australian Open.

World number 418 Samrej, who has been training with Novak Djokovic in recent weeks and won the Australian Open Asia-Pacific Wildcard Play-off to qualify, put in a sensational showing on his ATP Tour-level debut.

Yet after lashing the net in anger at one point in the third set, fifth seed Medvedev regained his composure.

Medvedev's wobble began in earnest when he squandered four break points at 3-3 midway through the third set, with Samrej then breaking in the next.

"Second and third set I couldn't touch the ball. I didn't know what to do," a good-natured Medvedev said afterwards.

"I watched his matches and I didn't see his level. If he plays like this every match, his life can be good!"

Medvedev was left shaking his head in disbelief as Samrej - the third Thai player in the Open Era to appear in the main draw at a grand slam - dealt with everything that was thrown his way at one stage.

However, once he hit his stride, last year's runner-up found his best level, breaking four times en route to sealing his spot in round two.

Data Debrief: Samrej shines

It was a day to remember for 23-year-old Samrej, who did himself proud. He became the first Thai player to win a set against a player ranked in the top five since Paradorn Srichaphan against Roger Federer in 2006.

In a strange twist, the last Thai player to appear at a major was Danai Udomchoke, who lost in five sets to Gilles Simon at the 2012 Australian Open.

Thirteen years on, Simon was coaching Medvedev as Samrej forced the Russian all the way.