Relative algebraic closure