A
lawyer may ask a court for permission to consider a witness hostile only under certain circumstances. First and foremost, the witness must be under
direct examination, and not
cross examination. This is because during cross examination, the witness is already considered to be hostile.
The reason a lawyer must have a witness considered hostile during direct examination is because (s)he is not allowed to ask leading questions of their own witness unless they are determined to be hostile. Once a witness has been declared hostile, another word for uncooperative, the lawyer may ask the leading questions he needs to, to get the answers out of the witness.