Image copyright Getty Images Image caption The sacking suggests President Mirziyoyev has won a power struggle unleashed following the death of former leader Islam Karimov

Uzbekistan's veteran security chief has been removed after 23 years in the post.

Rustam Inoyatov was one of the most powerful figures in the country.

But he was replaced at a meeting on Wednesday chaired by President Shavkat Mirziyoyev, state and private media said.

President Mirziyoyev, 60, has been implementing wide-ranging reforms since coming to power in 2016, following the death of longtime leader Islam Karimov.

They include liberalising the currency, improving relations with neighbours, freeing some political prisoners and calling on mass media and others to adopt a more critical stance.

Last December, he signalled that the National Security Service (SNB) would undergo major changes by the end of this year, such as a new law curtailing its powers.

At the helm of the huge intelligence service that controlled virtually all aspects of life in the country was Mr Inoyatov. The only person who had served longer than him was Islam Karimov.

But on Wednesday Mr Inoyatov, 73, was "released from duty" and replaced by the former prosecutor-general Ikhtiyor Abdullayev, said local media.

Climax of a power struggle?

Analysis: BBC's Abdujalil Abdurasulov

As the chief of the agency that was the KGB's successor, Mr Inoyatov was at the centre of the repressive machine that existed under Islam Karimov.

Mr Inoyatov created a system of ever-present fear to control society. The SNB identified and punished anyone who criticised the government. No dissent was tolerated.

Mr Inoyatov was regarded as one of three candidates to succeed Islam Karimov after his death in 2016, along with then Prime Minister Shavkat Mirziyoyev.

Mr Mirziyoyev secured the job, but a hidden power struggle had been unleashed between the two opponents.

Facing Mr Inoyatov's reported opposition to the new president's reforms, Mr Mirziyoyev made an open call for reform of the organisation.

Some observers, however, warn that now his main opponent is out of the way, Mr Mirziyoyev may go down his predecessor's path and try to consolidate all power in his own hands.