Prime Minister Justin Trudeau has formally apologized in the House of Commons for the Komagata Maru incident in 1914, in which hundreds of Sikh, Muslim and Hindu passengers were denied entry to Canada and forced to return to an uncertain and ultimately violent fate in India.

Opposition Leader Rona Ambrose, NDP Leader Tom Mulcair, BQ Leader Rheal Fortin and Green Party Leader Elizabeth May also rose to add their voices to the apology and to offer their own remarks.

"Canada does not bear alone the responsibility for every tragic mistake that occurred with the Komagata Maru and its passengers, but Canada's government was without question responsible for the laws that prevented these passengers from immigrating peacefully and securely, for that, and for every regrettable consequence that followed, we, are, sorry," Trudeau said.

Trudeau apologizes in the Commons for the Komagata Maru Incident 1:53

"First and foremost, to the victims of the incident, no words can erase the pain and suffering they experienced," Trudeau said. "Regrettably, the passage of time means that none are alive to hear our apology today, still, we offer it, fully and sincerely, for our indifference to your plight, for our failure to recognize all that you had to offer.

"For the laws that discriminated against you so senselessly, and for not apologizing sooner. For all these things, we are truly sorry."

Trudeau also apologized directly to the passengers' descendants, some of whom, he noted, were gathered in the House of Commons visitors' gallery to hear the apology.

"We can never know what your lives would have been like had your relatives been welcome to Canada," Trudeau said. "The ways in which your lives would have been different, the ways in which Canada would have been enriched. Those possibilities are lost to history, for that, and to you, we apologize."

The prime minister said Canada must now commit itself to positive action, to learning from mistakes and to make sure that we never repeat the errors of the past.

Interim Conservative Leader Rona Ambrose (centre) and Conservative MPs applaud Prime Minister Justin Trudeau as he formally apologizes for the Komagata Maru incident in the House of Commons on Parliament Hill in Ottawa on Wednesday, May 18, 2016. (Adrian Wyld/Canadian Press)

Trudeau ended his remarks with a tip of the hat to his Sikh Defence Minister Harjit Sajjan, who Trudeau said worked hard to bring the Komagata Maru incident to national attention.

The prime minister noted that before entering politics Sajjan was the commanding officer of the British Columbia Regiment Duke of Connaught's Own, the regiment that forced the British Komagata Maru out of Canada in 1914.

"The minister's family might well have been turned away from Canada, today the minister is an essential member of this government and sits here in this House," Trudeau said.

As Trudeau finished his remarks, several members of the visitors' gallery overlooking the House of Commons rose and called out a traditional Sikh chant and response.

'We want to live up to our own values'

Opposition Leader Rona Ambrose said that her side of the House welcomed the apology and wished to join with the government in offering a "deep and sincere commitment to honour the memories of those who suffered, and to learn the lessons of this tragedy."

Ambrose referenced former prime minister Stephen Harper's apology to the Sikh community in 2006, and subsequent apology in 2008.

"We take these actions because we want to live up to our own values," she said. "We cannot change the past but we can demonstrate Canada has changed.

"No nation can grow without re-examining our past and seeking to move beyond our ancient prejudices. And we can show those communities who have been wronged that their tragedies are understood and their experiences are valued."

Ambrose referenced the help Edmonton Sikh's have provided to those fleeing the forest fire in Fort McMurray, noting they were among the first to offer assistance to their fellow Albertans.

'Horrific chapter' in Canada's history

NDP Leader Tom Mulcair also rose in the House to offer his apologies, beginning by echoing remarks by Ambrose when she noted Harper's earlier efforts to express regret for the incident.

"Now here in this House today, we are making that act official, this act of contrition, from all Canadians for this historic tragedy," he said in French.

"It was racism pure and simple that put our fellow human beings at such risk," Mulcair said. "It was a horrific chapter in the history of a country that has come to recognize diversity and tolerance as great strengths."

NDP Leader Tom Mulcair is applauded as he looks to the gallery after Prime Minister Justin Trudeau offered an apology for the Komagata Maru incident following question period. (Adrian Wyld/Canadian Press)

The Komagata Maru steamship arrived on Canada's West Coast on May 23, 1914, anchoring in Vancouver's Coal Harbour. Its arrival was a direct challenge to Canada's immigration rules at the time, which had grown increasingly strict and discriminatory.

The ship was immediately greeted by immigration officials who refused to let its 376 passengers disembark.

Twenty people determined to be returning residents were eventually permitted entry, but no one else stepped foot off the boat.

During the two months the Komagata Maru sat in the harbour, the ship became a spectacle, with near-daily newspaper reports of developments and crowds of hundreds gathering at the waterfront to gawk.

The Komagata Maru was formally ordered out on July 19. Four days later under the guns of the naval cruiser HMCS Rainbow, the ship was escorted out to sea and began the journey to Calcutta.

The Komagata Maru was forced to return to India where some of the passengers were killed in a clash with police.

Upon its return to India it was met by British soldiers. Twenty passengers were killed in an ensuing riot, and others were jailed.

The B.C. government formally apologized for the incident in May 2008 and a monument was unveiled on Vancouver's seawall in 2012, funded by the federal government. B.C. Premier Christy Clark is in the House of Commons visitor's gallery Wednesday for the apology.

But Prime Minister Stephen Harper stopped short of a formal apology in August 2008, when he instead apologized at a Sikh gathering of 8,000 in Surrey, B.C., home of the country's largest Indo-Canadian population.

The Liberals have been pushing for a formal apology for years and Trudeau made pre-election promises to do so in both 2014 and 2015.