Merchant republics are obtained when someone is given a coastal city title as their capital and given a title duke level or above. Perhaps you somehow ended up doing that? Fortunately, you shouldn't worry because MRs will not stay in the dynasty forever, but the MR is made up of 5 patrician families, one of which is guaranteed to belong to your dynasty member. Elections are held periodically and the best patrician family will win. So it won't be permanently part of your dynasty but they will probably be king once every couple generations.I granted the kingdom of Jerusalem to an unlanded dynastic member, however somehow he turned to a merchant Republic and every other title within Jerusalem with it. How does this happen?
I dont know how the MR mechanics work, but will his titles stay in my dynasty, e.g. will his son inherit it (he has no son yet, and no heir is listed) or will some random Dude get it?