A Serbian court on Wednesday said it had ordered the release from custody of a former minister who was detained over a fatal train station accident earlier this month.