An Alabama pastor is fighting in court to keep his job after having sex with members of his congregation without telling them he is HIV positive.

Pastor Juan McFarland said the church constitution (Section 6.1 of the bylaws of Shiloh church) protects him from losing his job over this scandal, reported AL.com. He brought that claim to court, where a temporary injunction was put against him on Oct. 16 until his trial ends.

McFarland likely had AIDS since 2003, reported AL.com.

Kenneth Shinbaum, the attorney for the deacons, argued that if the congregation votes to fire McFarland the pastor's job would no longer be protected as per a constitutional change that was put in place in January 2013, reported AL.com.

In court on Monday McFarland had very general answers, admitting to committing a "sin against God." When asked about misusing church money and sleeping with church members the pastor plead the Fifth Amendment, which allows a defendant to not incriminate himself in court, AL.com reported.

Since confessing to having AIDS in late August, McFarland has also confessed to using cocaine and marijuana, misusing church money, having a pistol and a bad temper, and having sex with congregation members, reported AL.com

Judge Charles Price said he will have a decision within a week.