Google's artificial intelligence program AlphaGo has been awarded the highest Go grandmaster rank, reserved for those whose ability at the ancient board game borders on "divinity".

The association announced the award before AlphaGo won the final game of the five-match series with South Korean grandmaster Lee SeDol.

A visibly upset Mr Lee held his head in his hands at the table after resigning at the end of a five-hour battle.

AlphaGo was given an honorary "ninth dan" professional ranking, equivalent to that held by Mr Lee who has 18 international titles to his name and is widely considered one of the greatest Go players of the modern era.

"Neither man nor machine has ever received an honorary professional dan certificate to date, although many people have received honorary amateur certificates", a spokeswoman for South Korea's Go Association said.

The citation on the certificate, serial-numbered 001, said it was given in recognition of AlphaGo's "sincere efforts" to master Go's Taoist foundations and reach a level "close to the territory of divinity".

AlphaGo won the first three games against Lee fairly easily, but the 33-year-old South Korean then fought back to take the fourth match.

Described as the "match of the century" by local media, the series was closely watched by tens of millions of fans of the ancient board game - mostly in East Asia - as well as AI scientists.

The "machine vs human" element meant the games also made headline around the world, with AlphaGo's winning performance hailed as a watershed for the future of AI.

The most famous AI victory to date came in 1997, when the IBM-developed supercomputer Deep Blue beat the then-world class chess champion, Garry Kasparov.

But Go, played for centuries mostly in Korea, Japan and China, had long remained the holy grail for AI developers due to its complexity and near-infinite number of potential configurations.

AlphaGo uses two sets of "deep neural networks" that allow it to crunch data in a more human-like fashion - dumping millions of potential moves that human players would instinctively know were pointless.

It also employs algorithms that allow it to learn and improve from matchplay experience.

Its creators, DeepMind, say the technology has far-ranging, real-world applications from making smartphones smarter to health care.