Kenya's parliament has approved a controversial plan by the government to deploy about 1,000 police officers to Haiti to help stop gang violence.
This is despite a court order barring any deployment, pending the outcome of a legal challenge into the plan.
Opposition lawmakers condemned the vote, but the ruling party used its majority to back the government following a fiery debate.
Haiti had appealed for international help to tackle growing lawlessness.
Kenya's offer won the UN Security Council's approval last month, but the plan has been opposed by the main opposition party.
About 300 gangs are active across Haiti and 80% of the capital, Port-au-Prince, is under gang control.
These groups have taken increasing control of the city since the assassination of the country's president in 2021 threw Haiti into a political crisis.
At Thursday's vote in Kenya's parliament, lawmakers supporting the motion said the country was part of the global community and could not ignore the appeals for help from other countries.
They also argued that the East African nation has a history of peacekeeping missions such as in Somalia, the Democratic Republic of Congo and Sierra Leone.
Parliament approved the plan in a voice vote moments before the High Court was due to begin hearing the case on the planned deployment.
A small opposition party, Thirdway Alliance, has led the legal challenge, saying the plan was unconstitutional because only the military could be deployed abroad.
The government has rejected the argument, and is defending the case.
The court later reiterated that the deployment could not take place until it gave its ruling in January.
Thirdway Alliance's legal representative, Charles Midega, told the BBC that it was a "brazen" act by parliament to discuss the deployment despite the court order.
In parliament, opposition lawmakers argued that a vote could not be held on a matter before the courts.
But governing party lawmakers said there were no rules barring parliament from debating the issue, for as long as it did go into the substance of the case.