 In 1039, Mir's brother, Folc Geribert, granted the castle of Ribes near Olèrdola to their uncle the bishop.Thus deprived of any control over an important frontier fortress, Mir negotiated for the return of the castle in 1041, when he received it back from the bishop in return from swearing homage.At some point in his battle with Raymond Berengar, Mir assumed the title "princeps Olerdulae", which implied independent authority.