A court to mainly try suspected pirates has opened in the Kenyan port of Mombasa, funded by international donors.
Pirates based in neighbouring Somalia have made the Gulf of Aden one of the world's most dangerous shipping lanes.
Warships from several world powers now patrol the Indian Ocean but there has been confusion about where those arrested should face justice.
Some 100 suspects are in Kenya and 18 pirates have already been convicted.
Earlier this year, Kenya said it would stop prosecuting piracy cases unless other countries agreed to share the "burden".
Several suspected pirates detained by naval patrols on the high seas were released because of a lack of clarity about where and how to prosecute them.
The BBC's Jamhuri Mwavyombo in Mombasa says the new courtroom at Shimo la Tewa prison was opened to much fanfare with top government officials and diplomats in attendance.
Kenya's Justice Minister Mutula Kilonzo sought to reassure the more than 100 pirate suspects also at the ceremony that they would get a fair trial in Kenya.
Visitors were also shown a holding room where evidence - like an attack boat and rusty arms and ammunition - was being stored, our reporter says.
The court is being funded to the tune of $5m (£3.3m) by several donors, including the United Nations Office on Drugs and Crime, the European Union, Australia and Canada.
It opens a month after the EU's top diplomat, Catherine Ashton, went on a tour of East Africa to help drum up support for tackling the pirates.
The EU's representative in Kenya Eric van der Linden told the BBC the money has also been used to refurbish the prison and support the prosecutor's office in Mombasa to speed up the cases.
"I'm not a pirate. I'm a fisherman - still two years I am here," one of the suspects complained to the BBC at the court opening.
Analysts say the court is a significant step forward in the fight against piracy although, officially, it will also be used for other serious criminal cases.
It appears Kenya's strategy of threatening to stop putting pirate suspects on trial has paid off, although Mr Kilonzo warned more donor funding was still needed or it would stop its co-operation.
"I'm certainly not satisfied... that's why the government has given a six-month notice of its intention to stop unilaterally, all alone facing this challenge of piracy. But negotiations are ongoing," he said.
Any pirates convicted by the new Shimo la Tewa will also serve their sentences at the prison, joining those already found guilty.
Lawyers for pirate suspects have argued, unsuccessfully, that Kenya does not have the jurisdiction to try their clients.
In the first case of its kind to come to trial in Europe a Dutch court last week sentenced five Somali men to five years in prison for attacking a Dutch Antilles-flagged cargo ship in the Gulf of Aden in 2009,
Other Somali piracy suspects are being held in France, Spain, Germany and the US.
There has been a surge in pirate attacks in recent months after a relative lull, with some ships seized closer to India than Somalia.