A US pastor will ask a federal judge to reject a lawsuit that accuses him of campaigning to persecute gays in Uganda.

Minister Scott Lively of the Redemption Gate Mission Society church in Massachusetts has been taken to court by an East African gay advocacy group.

He has called the lawsuit “absurd” and “completely frivolous.”

The group were able to file the lawsuit in 2012 under a law that allows non-citizens so file court actions for violation of international law.

New York-based group Centre for Constitutional Rights filed the suit on behalf of Sexual Minorities Uganda.

Lively claims he did not preach punishment of gay people in the African country but rather advised therapy in his preachings against homosexuality.

A hearing will be held Wednesday in U.S. District Court in Springfield on Lively’s request for summary judgment to keep the case from going to trial.

Uganda’s Foreign Minister Sam Kutesa has blamed the country’s anti-LGBT laws on British Colonialism.

Speaking before a United Nations human rights panel, Kutesa contended that his country was not to blame for its current anti-LGBT laws.

Uganda’s archaic penal code, “carnal knowledge against the order of nature” between two males carries a potential penalty of life imprisonment.

A harsher anti-gay law was signed into law in 2013, but it was later thrown out by the country’s Supreme Court on technical grounds.

Uganda Pride was disrupted and broken up by police this year following a warning from Uganda’s Minister of State for ‘Ethics & Integrity’.