LONDON (Reuters) - A London court on Thursday rejected a legal challenge against the deal between Britain’s ruling Conservatives and a Northern Ireland party that allowed the government to cobble together a parliamentary majority in June.

Britain's Prime Minister Theresa May coughs as she addresses the Conservative Party conference in Manchester, October 4, 2017. REUTERS/Phil Noble

After losing their majority in a disastrous snap election on June 8, Prime Minister Theresa May’s Conservatives secured support from the Democratic Unionist Party (DUP) in return for a pledge to spend an extra 1 billion pounds in Northern Ireland.

In a crowdfunded legal challenge brought by a Northern Irish citizen, lawyers argued that the deal, known as a confidence-and-supply agreement, was corrupt because it amounted to using public money to buy votes.

But after a one-day hearing, the High Court rejected their arguments and denied permission for judicial review of the deal. The judges said neither of the grounds put forward against the deal was legally arguable.

The challenge was launched by Ciaran McClean, a mental health worker and Green Party member living in Northern Ireland, who raised 92,000 pounds ($121,600) on a crowdfunding website and was present in court on Thursday.

Lawyers acting for him told the court that “the Conservative Party purchased the political support of the DUP for the sum of 1 billion pounds” and that the deal was an offence under the Bribery Act 2010.

Government lawyers responded that the public expenditure contemplated by the deal would be authorised by parliament, and that the criminal law of bribery did not apply to a confidence-and-supply agreement between political parties.

On his fundraising page, McClean had written that the Conservative-DUP deal violated Northern Ireland’s 1998 Good Friday peace agreement which ended decades of armed sectarian conflict in the province.

Under the peace deal, the UK government is required to be impartial between unionists who want the province to remain part of the UK and republicans who aspire to become part of Ireland.

“The government is threatening hard-won peace with their pact with the reactionary DUP,” McClean wrote.

However, for technical legal reasons, that line of argument did not form part of the case heard by the High Court.

May, who replaced David Cameron as prime minister after the Brexit referendum in June 2016, inherited a narrow parliamentary majority from him.

In April 2017, with opinion polls suggesting she had a double-digit lead over the opposition Labour Party, she called a snap election, hoping to increase her majority. But after an uninspiring campaign, they lost their majority.

Support from the DUP’s 10 members of parliament has enabled May to cling to power as Britain moves closer to the challenge of leaving the European Union.