Madrasah of Muhammad Rahim-khan stands opposite to the gates of Kunya-Ark. The madrasah is one of the biggest in Khiva. It was built in 1876 by order of Seyid Muhammad-Rahim II (1863-1910), known as the poet Feruzshah. In 1873 the Russian army invaded the khanate and established Russian protectorate.The rectangular building of the madrasah has four-aivan yard and small towers in the corners. Its big entrance portal is flanked with "wings" and five-beam arcade of niches. Hudjras of the madrasah are covered with "balkhi" domes and have back and living rooms.