President Uhuru Kenyatta has sent his message of congratulations to Canadian Prime Minister Justin Trudeau following Monday's narrow victory.

Is there a story unfolding in your community? Let Hivisasa know

The head of state who's currently in Japan, has been enjoying cordial relationship with the Canadian PM, a move that saw him honour invitation in June this year.

In his message, Uhuru pledged to continue working closely with Trudeau, adding that Kenya is keen to foster bilateral relationship between the two nations.

"Hearty congratulations Prime Minister @JustinTrudeau on your re-election. Kenya welcomes your win and looks forward to continue working with your administration in strengthening bilateral ties between our two nations," he said.

Trudeau's Liberals will form a new government for the next four years but he has to seek support from other parties after the party failed to garner majority.

After polls closed, Canadian broadcasters CTV and CBC declared a Liberal minority government, which means Trudeau will have to work with other parties in order to govern.

"You did it, my friends. Congratulations," Trudeau, 47, told supporters in Montreal early on Tuesday

"From coast to coast to coast, tonight Canadians rejected division and negativity. They rejected cuts and austerity, and they voted in favour of a progressive agenda and strong action on climate change."

The Canadian Parliament has 338 slots and this means, for the party to gather majority, it must get over 170 MPs. The country practices Parliamentary system of government.