State television showed footage late Sunday of libyan leader Muammar Gaddafi playing the chess game with FIDE president Kirsan Ilyumzhinov while watched by the Libyan leader's eldest son Muhammad.
Gaddafi, who was last seen in public when was shown on television welcoming South African President Jacob Zuma to Tripoli on 30 May, wore a brown cloak and dark sunglasses.
The television did not say where the chessboard meeting took place but Ilyumzhinov told Russia's Interfax news agency that he had played against Gaddafi in Tripoli on Sunday.
The Russian eccentric who once claimed he hosted extraterrestrials, also sat down for a game of chess with Gaddafi's son Muhammad and the two played the Sicilian defence, Interfax said.
"The meeting lasted around two hours, we played some chess with Gaddafi," Ilyumzhinov, who is on a visit to Tripoli in his capacity as FIDE president, told Interfax.
"Gaddafi stated that he is not going to leave Libya, stressing that it is his motherland and a land where his children and grandchildren died. He also said that he does not understand which post he needs to step down from."
"I am neither premier nor president nor king. I do not hold any post in Libya and therefore I have no position which I should give up," Ilyumzhinov quoted Gaddafi as telling him.
Ilyumzhinov, who also met with foreign and education ministers, said he saw a lot of destruction in Tripoli.
The chessboard encounter came as fighting between Gaddafi's forces and rebels raged across Libya, with casualties reported in Zintan and the regime saying it had eliminated resistance in Zawiyah west of the capital.
Battles were also being fought in the Berber mountains southwest of Tripoli, in nearby Yafran, and at Dafnia near Misrata, Libya's third city, rebel sources told AFP.
An AFP correspondent said Gaddafi's forces pounded the outskirts of Zintan on Sunday, killing at least seven rebels.
Government forces posted a few kilometres (miles) east of Zintan, which remains under rebel control, fired Grad and Katyusha rockets at the town.
The AFP reporter said after visiting the local hospital that at least seven Libyan rebels were killed and 49 wounded in the bombardment.
NATO said it was taking "necessary action" to protect civilians. "NATO is monitoring the situation closely and is taking necessary action to protect civilians," a statement said.
"Along the north-west coast of Libya between Tripoli and the Tunisian border Libyans long tired of Gaddafi rule are challenging his legitimacy openly, and in doing so, are under threat of attack," it said.
In Tripoli, the regime spokesman said its forces had eliminated rebel "pockets of resistance" at Zawiyah west of the capital. Mussa Ibrahim told reporters that Gaddafi's forces had "total control" of the area from Ajdabiya in the east to the Tunisian border in the west.
He denied reports that the rebels were gaining ground, while at the same time acknowledging clashes at Zawiyah but playing down their intensity. "It is pockets of resistance. The rebels there are no more than a hundred. The army has killed some of them, captured others and is negotiating the surrender of others," Ibrahim said.
He also reiterated that the regime rejected any talks about Gaddafi leaving the country.
"No one has the right to demand that the leader stand down. No one can come here with a plan that includes his departure," he said, adding such an idea is "immoral, illegal and has no sense."
Tension were also high in the area between Zintan and Yafran, a region bitterly contested by rebels and loyalist troops, the AFP correspondent said.
Hospital staff in Yafran, on condition of anonymity, said foreign doctors were prevented from leaving by pro-Gaddafi forces, who allegedly detained and beat up some employees.
The fighting in Zawiyah just 40 kilometres (25 miles) west of Tripoli, which follows more than two months of relative calm in the city of 250,000 people, erupted on Saturday, a rebel source told AFP in Benghazi.
Gaddafi's forces wrested control of Zawiyah from the rebels after fierce fighting there in February and March.
An influx of refugees into neighbouring Tunisia at a key border crossing has dropped off after the route from Tripoli was cut off by the fighting in Zawiyah, one traveller said.
The United Arab Emirates on Sunday became the 12th nation to recognise the rebel National Transitional Council in Benghazi as the "sole legitimate representative of the Libyan people," the official WAM news agency reported.
Russia has offered to mediate in the Libya conflict and the Kremlin's special representative to Africa, Mikhail Margelov, visited rebels in Libya's east this week. He is now preparing a trip to Tripoli.