VANCOUVER -- India's prime minister has pronounced his watershed three-day visit to Canada a success, expressing hope in a parting toast that a new partnership has begun.

"Although India and Canada have so much in common, we were not in each others' thoughts for so many years," Narendra Modi said in a translated farewell speech Thursday night in Vancouver.

"But today it is my deep belief that not only we will be present in each other's thoughts, but also in our endeavours we will work together. We will be with each other."

The leader of the right-leaning majority Hindu nationalist party told a state dinner held by Prime Minister Stephen Harper, and which drew B.C.'s premier and assorted Conservative MPs, that both countries have made progress on many issues.

"Barriers have turned into bridges," he said.

Modi is the first Indian prime minister in more than four decades to come for a one-on-one visit with his Canadian counterpart.

Modi said he was confident the bilateral investment promotion and protection agreement and the comprehensive economic partnership agreement would happen soon.

"By participating in India's development, you will also benefit. But by participating in the progress and prosperity of one-sixth of humanity, you will get immense happiness and satisfaction," he said.

"From 1.2 billion Indians to 1.2 million Canadians of Indian origin -- our very best wishes."

Modi's lightning-fast trip ushered him through Ottawa, Toronto and Vancouver. He signed pledges to co-operate on civil aviation, education and health and buy 3,000 tonnes of Saskatchewan uranium, before paying homage to darker chapters of Indo-Canadian history.

The leader of the world's largest democracy earned effusive praise from supporters, who turned out in droves for his speech at a Toronto venue famous for rock shows, as well as Sikh and Hindu temples in Metro Vancouver.

But protesters raised their voices and placards outside every event he attended in B.C.

Bidding adieu to his ally, Harper said he wanted to publicly re-affirm a statement he's made to Modi in private.

"Make no mistake, the government of Canada and Canadians overwhelmingly support and will always standby the unity and strength of India in the world -- India will stay together," he said, eliciting cheers.

Earlier Thursday, Modi visited a more-than-century-old Sikh gurdwara in Vancouver, where he and Harper were presented with bright yellow scarfs and kirpans, ceremonial swords worn by baptized Sikhs.

Several dozen police officers were stationed outside, with snipers on the temple rooftop.

A protester who said his name was Ramandeep held a sign saying, Harper shame! Modi is a genocide perpetrator!

"He is a known butcher. His nickname is the Butcher of Gujarat," he said, referring to a 2002 riot that resulted in the deaths of hundreds of people, mostly Muslims, while Modi was the chief minister in Gujarat state.

The two leaders also walked through an adjoining museum dedicated to nearly 400 Indians, mostly Sikhs, who arrived at Vancouver's harbour aboard the Komagata Maru in 1914 but were denied entry.

Modi then took the stage before hundreds of awe-struck revellers outside a Hindu mandir in Surrey.

Families with tiny children hooted, clapped and shielded their eyes from blinding sun during the short speech while waving paper India and Canadian flags.

A brass band prompted the crowds to sing "We love Modi. We love Harper."

Surrey resident Sanjeev, 50, who didn't give his last name, said he arrived hours early to see the famous politician.

"We were here since 10 in the morning and for these 15 minutes, we had to wait," he said.

Sikhs in Vancouver were at the forefront of a movement to create a separate Sikh homeland, to be carved out of the Indian state of Punjab. The situation boiled over in the 1980s, when 329 people were killed aboard an Air India flight originating in Vancouver when a planted bomb exploded mid-air near Ireland.

Modi's detractors say he should speak out about human rights violations in India against minority groups including Sikhs, Muslims and Christians.

Investigators blamed the largest mass murder in Canadian history on Sikh extremists in British Columbia.