Image copyright Reuters Image caption Mourners carry Ko Ni's coffin at his funeral in Yangon

Thousands of people have attended the funeral of a leading lawyer shot dead in Myanmar's commercial capital, Yangon, on Sunday.

Ko Ni, who was an adviser to Aung San Suu Kyi's National League for Democracy (NLD) party, was shot in the head at Yangon airport.

A suspect has been detained but there are no details on the motive.

Ko Ni, who the NLD described as "irreplaceable", was a rare prominent Muslim in a Buddhist-majority nation.

It is not clear whether his religion was a factor in his death. The well-respected constitutional lawyer had spoken up in defence of rights for Muslims and had also criticised the military's grip on power.

Political killings are extremely rare in Myanmar, also called Burma. A taxi driver who tried to stop the gunman escaping was also shot dead.

Image copyright Reuters Image caption Ko Ni was a highly respected lawyer who advised Aung San Suu Kyi

Image copyright Reuters Image caption Ko Ni's funeral was held at a Muslim cemetery on the outskirts of Yangon

Image copyright EPA Image caption Ko Ni was shot in the head at point blank range outside Yangon airport

Ms Suu Kyi does not appear to have made any public comments yet. But in a statement, the NLD said: "We strongly denounce the assassination of Ko Ni like this as it is a terrorist act against the NLD's policies."

Senior NLD leader Tin Oo described Ko Ni's death as a "great loss for the country, for democratic forces and for us (the party)".

Rights group Amnesty International said the killing had "all the hallmarks of an assassination". It called for a thorough investigation into the death of a man it described as a "tireless human rights campaigner".

Large crowds of mourners, including MPs, activists and Buddhist monks turned out for his funeral at a Muslim cemetery.

"All I want to say is, of course we are all shocked and really sad,'' said US Ambassador Scot Marciel. "I knew Ko Ni and his commitment to his country and democracy.''

'Emotional crowd' - By Jonah Fisher, BBC News, Yangon

Exactly 24 hours after he was shot dead Ko Ni's funeral took place on the outskirts of Yangon. A large, emotional crowd, mainly of Muslims but including Christians and Buddhists, filled the Ye Way cemetery.

Among them was a three-year-old called Erfan. He'd been in the arms of his grandfather at Yangon airport, when the assassin walked up behind them and shot Ko Ni in the head. Incredibly Erfan appears to be fine, chuckling away as his mother sobbed.

As I soon discovered, publically asking people why they think Ko Ni was killed is a sensitive matter. Among those at the funeral willing to talk, most thought he'd been assassinated for his work on constitutional affairs.

As well as being a top lawyer, Ko Ni was a legal adviser to Aung San Suu Kyi's political party. He's been credited with finding loopholes in the existing military-drafted constitution and in particular with creating the far-reaching role of state counsellor, which Ms Suu Kyi now occupies.

So far there's been no word from the police on what the alleged assassin has been saying in custody. The authorities in Mandalay say that Kyi Lin spent more than a decade in prison for illegally dealing in Buddha's heads and antiquities, before being released in a presidential amnesty in 2014.

Ko Ni was shot at point blank range outside the terminal as he held his grandson. The suspect then fled but several taxi drivers chased him, according to The Irrawaddy. The suspect shot one driver, U Nay Win, before being detained by police.

The suspect has been named by police as Kyi Lin, 53, but there is no information as to motive.

Ko Ni had been returning from a meeting in Indonesia to discuss sectarian tensions in Rakhine state when he was killed.

Anti-Muslim feeling is high in Myanmar, and there is significant public support for a military operation in Rakhine, which is home to thousands of Rohingya Muslims.

The military says it is restoring security after a deadly attack on police officers in October last year that it blamed on Rohingya. But it has been accused of widespread human rights abuses, including arbitrary arrests, beatings and the burning of villages.

Rohingya are denied citizenship and are considered illegal immigrants by the government. The NLD runs the current government but the military-drafted constitution ensures the military retains power over key institutions.

Ko Ni's daughter, Yin Nwe Khine, told Reuters he was "often threatened" because he had spoken out against the continuing influence of the military on politics.

"We were warned to be careful, but my father didn't accept that easily. He always did what he thought was right.

"A lot of people hate us because we have different religious beliefs, so I think that might be why it happened to him, but I don't know the reason."