A Mombasa High Court has ordered the government to make public the Standard Gauge Railway project contract.
Cabinet Secretary for transport, road and infrastructure James Macharia has been directed to effect the order.
The SGR project was financed and implemented by the Chinese Government.
The ruling came even after the state objected to the move saying unveiling the document to the public might threaten the security of the nation.
The court ruled that the State provided insufficient evidence to merit the argument that the contract between Kenya and the Chinese government was of national security concern and thus could not be disclosed.
The petition seeking to have details of the contract made public was made by Khelef Khalifa and Anor.
The argued that the contract should be made public in line with the Access to Information Act.
The court ruled in favour of the petitioners and directed the Cabinet Secretary for Transport and Infrastructure to implement the directive.
The order come years after President Uhuru Kenyatta pledged to make public the document, a move is yet to do to date.
The SGR contract has been a subject of debate among Kenyans with allegations of inflation of costs marring it.
Reports claim the project which gobbled up millions of shillings was built at a price far more than what its real cost is.