Updated

Turkey's prime minister on Friday slammed a protest march led by the leader of the country's main opposition party following a 25-year prison sentence handed down to a party lawmaker.

Prime Minister Binali Yildirim said Kemal Kilicdaroglu, as the head of the secular Republican People's Party, should respect the judiciary's decision. "You cannot seek justice on the streets, and Turkey is a state of law ... it's not nice to complain about our country to the whole world by taking to the street."

On Wednesday, a Turkish court convicted parliamentarian Enis Berberoglu for revealing state secrets. He was accused of giving journalists footage of a search on Syria-bound trucks, leading to Cumhuriyet newspaper's 2015 coverage suggesting Turkey's intelligence service had smuggled weapons to Islamist rebels in Syria.

Kilicdaroglu called the verdict "unjust" and alleged the judiciary was influenced by the government. Along with supporters, he launched a 265-mile (426-kilometer) "march for justice" Thursday from the capital, Ankara, to an Istanbul prison where Berberoglu is being held.

"He doesn't need to walk in the holy month of Ramadan, in this heat, he can take the high-speed train. Why is he torturing himself?" the prime minister asked. He said solutions could be pursued in parliament and in court. "I recommend he gives up on this."

Earlier Friday, Justice Minister Bekir Bozdag said Kilicdaroglu was committing a crime by "targeting, defaming and threatening" members of the judiciary. He emphasized that appeal processes were available to contest Berberoglu's verdict.

Berberoglu, 61, is the first legislator from the Republican People's Party to be imprisoned since a constitutional amendment stripped parliamentary immunities last year. A dozen pro-Kurdish lawmakers are already in prison for allegedly supporting terror, and more than 50,000 people have been arrested since July for purported links to U.S.-based cleric Fethullah Gulen, who Turkey blames for masterminding a bloody coup attempt. Gulen denies it.

Berberoglu, along with Cumhuriyet's former editor-in-chief Can Dundar and its Ankara representative Erdem Gul, is also on trial for "aiding a terror organization without being members," referring to Gulen's network. The court has claimed the cleric to be the source of the leaked footage.