Not perfect after all. South Korean Go champion Lee Se-dol rallied in the fourth match -- the most tantalizing so far -- against DeepMind's Artificial Intelligence (AI) AlphaGo to clinch a victory in the historic battle between man and machine.

Initially ahead, AlphaGo made mistakes in the end game that gave the Korean an opening to rally and take the dramatic victory in the landmark series of games happening in The Four Seasons Hotel, Seoul.

The score is now 3-1. AlphaGo secured a hat trick by beating Lee on Saturday and is already the victor in the series of games, whatever the results of the final game.

With the latest win, the South Korean grandmaster has now saved face.

The grand ballroom where the match is taking place erupted in cheers and Korean broadcasters shouted excitement when the AI threw the stone marking its resignation.

"But because I lost three matches, this one match is so valuable. I would not change this win with anything in the world," a noticeably happy Lee said.

The fourth match started similarly to the second, where AlphaGo started as black and Lee played attempted a steady game in the defensive, with the former seemingly in the advatange.

The match moved quickly and Lee already started using his overtime 3 hours into the game. The 33-year-old, however, rallied and opened a chance to even the score by taking the battle to center of the board in the 78th turn.

The brilliant single move -- which baffled both English and Korean commentators -- changed the tide of the game. AlphaGo reacted with a mistake in the 79th, and started to place stones in unusual moves that aggravated its disadvantage.

It was a completely different playing-style for the Korean from the three previous games and a return to form.

The champion rallied and it was the closest call out of the four games played until now. The AI commenced irregular moves -- changing-up the pattern to get the advantage -- around mid- to end-game when Lee was starting get the edge but the 33-year-old remained calm and blocked the attacks.

AlphaGo resigned at 44 minutes overtime, after 180 turns.

DeepMind CEO Denis Hassabis tweeted near end of the game: "Lee Sedol is playing brilliantly! #AlphaGo thought it was doing well, but got confused on move 87. We are in trouble now... Mistake was on move 79, but #AlphaGo only came to that realization on around 87."

He congratulated Lee after the game: "Lee Sedol wins game 4!!! Congratulations! He was too good for us today and pressured #AlphaGo into a mistake that it couldn't recover from."

Chinese Go ranking No.1 Ke Jie, in an interview with Korean media Yonhap, sent a congratulatory message to Lee saying he hoped his played his own game. Ke has previously said he was also willing to go against DeepMind's AI possibly in the future.

The champion himself admitted defeat and said he would mostly enjoy playing the remaining games now that there was no pressure for him to win. "Lee Se-dol lost. Not man," he said, promising to put on his best in the remaining two games.

After expressing shock after the first game, South Koreans are now resigned to the loss and are jokingly calling the computer "Al-Sabum," which means, literally, "Master Al."

The match has been compared to IBM's Deep Blue victory against chess champion Garry Kasparov in 1997 that shocked the world.

Go has considerably more variable than chess and was until considered difficult to teach computers.

Alphabet executive chairman Eric Schmidt and Google founder Sergei Brin have visited Seoul to watch the match.

The final match is on Tuesday. A 3-2 result in the series now seems possible.