SIEM REAP — An ancient Angkor temple in northwestern Cambodia was reopened to the public on Sunday following the completion of a decades-long renovation project described as the world's largest puzzle.

The restoration of the 11th-century Baphuon monument, one of the country's largest after Angkor Wat, was celebrated with a high-profile ceremony attended by Cambodian King Norodom Sihamoni and French Prime Minister Francois Fillon.

The finished project is the result of half a century of painstaking efforts by restorers to take apart the crumbling tower's 300,000 sandstone blocks and then piece them back together.

"The work at Baphuon has been exceptional," Fillon said at the inauguration event in the northwestern tourist hub of Siem Reap, which drew thousands of Cambodians waving French, Cambodian and European Union flags.

King Sihamoni expressed his people's "profound gratitude to France" for completing the 10-million-euro ($14m), French-funded undertaking.

A French-led team of archaeologists dismantled Baphuon in the 1960s because it was falling apart and laid out its many stone blocks in the surrounding jungle.

Efforts to rebuild the pyramidal structure were interrupted by the civil war in 1970, and the records needed to reassemble it were destroyed by the hardline communist Khmer Rouge which took power in 1975.

In 1995, when the area was again safe to work in, the project -- by then known as the world's biggest three-dimensional puzzle -- was restarted.

Fillon said French archaeologists would next turn their attention to the 2.7-million-euro restoration of the Western Mebon temple in Angkor park.

The Angkor region was the seat of the medieval Khmer empire.