Mamia was a younger son of
George III Gurieli and his wife, Princess Tamar
Chijavadze. On George's death at the battle of Rokiti against King
Alexander IV of Imereti in 1684, Mamia joined his brothers in exile in
Akhaltsikhe under the protection of its
Ottoman governor Yusuf-Pasha. In the subsequent infighting between Mamia's elder brother
Kaikhosro and his paternal uncle
Malakia, the former lost his life, while the latter was deprived of
his sight. Eventually, in 1689, at the request of Guria's nobility, Mamia was summoned from Akhaltsikhe and installed as prince with the pasha's support, while the blinded Malakia was made
Bishop of Shemokmedi by the new Gurieli ruler. In 1690, Mamia hosted
George XI, the exiled
king of Kartli and a foe of Alexander IV of Imereti, but soon became suspicious of his nobles' loyalty to the guest and began a crackdown on the suspected opposition, forcing George to relocate to the Ottoman-controlled
Gonio. In the incessant power struggles in Imereti, Mamia originally supported his father-in-law
George Abashidze, but, in 1699, he helped Abashidze's estranged son-in-law,
King Simon, return from his exile in Kartli and recover the crown of Imereti. In return, Simon agreed to divorce Abashidze's daughter Anika and marry Mamia's sister. Abashidze, supported by the
Mingrelian regent
George Lipartiani, marshaled his troops on the borders of Guria and requested that Gurieli kill Simon, promising to make Mamia king of Imereti. Gurieli refused to do that himself, but allowed Abashidze's agents to shoot Simon dead in a bathroom in 1701. == First reign in Imereti and Ottoman invasion ==