TOKYO/SEOUL, Dec 21 (Reuters) - South Korea's Samsung Electronics will invest around 40 billion yen ($280 million) over five years in a facility for research into advanced chip packaging it will set up in Japan, according to an announcement by the city of Yokohama.

Reuters reported in March that Samsung was looking at establishing a packaging facility in Kanagawa prefecture, where it already has a research and development centre, to deepen ties with Japanese makers of chipmaking equipment and materials.

The investment comes at a time of easing tensions between South Korea and Japan as the United States encourages allies to work together to counter China's growing technological prowess.

Companies are racing to develop advanced packaging techniques, which involve combining components in a single package to improve overall chip performance.

The Japanese facility will allow Samsung to strengthen its leadership in chips and partner with packaging-related companies based in Yokohama, the head of Samsung's chip business Kyung Kye-hyun said in the city's announcement. ($1 = 142.8900 yen) (Reporting by Sam Nussey and Joyce Lee; Editing by Jamie Freed)