A Fianna Fáil activist has claimed electoral laws on gender quotas are unconstitutional.

Brian Mohan, 30, is challenging the legislation in the High Court.

The bricklayer and student had hoped to be selected to run for Fianna Fáil in the Dublin Central constituency.

But the party issued a directive that only one candidate could be selected and that person had to be a woman.

Mr Mohan comes from a staunch Fianna Fáil background the court heard, and joined the party when he was 16.

He is the chairman of his local constituency council in the Dublin Central constituency.

The court heard he was politically ambitious.

He and two women - Denise McMorrow and Mary Fitzpatrick - were chosen by the constituency to go forward to a selection convention in October last year.

However, he says Fianna Fáil was having trouble complying with gender quota legislation brought in in 2012.

The legislation says a party will have its State funding reduced by half unless 30% of its general election candidates are female.

That target is due to increase in seven years to 40%.

The State has a fund of €5.4 million to distribute to the political parties.

Michael McDowell, senior counsel for Mr Mohan, said the fund had become more important than ever given the restrictions on private donations to political parties.

He said the fund was not the "icing on the cake" for political parties, it was the cake itself.

He said that before the Dublin Central convention Fianna Fáil had selected 47 candidates in 31 constituencies and only ten were women.

He said he was told by the party that gender quotas were a fact of life. And a directive was issued that Dublin Central could select only one candidate and that person should be a woman.

At the convention in October, Ms McMorrow withdrew her nomination in protest at the gender quota decision and Ms Fitzpatrick was selected to be the party's candidate.

Mr McDowell said a decision to adopt gender quotas had not been taken by the Fianna Fáil party itself.

He told the court it was outside the powers of the Oireachtas to attempt to influence through the use of State money who presented for election.

He said Oireachtas members could not use State funding to bring about a particular type of candidate or result in a general election.

Mr McDowell said it was agreed that there was a divergence between the number of women in the population and the percentage of female TDs.

But he said the State could not use public money to ensure the Dáil was a demographic reflection of the population.

If this was legitimate, he said, the Oireachtas could introduce other quotas relating to race or religion or other ethnic minorities.

He said it was for the people alone to decide who the country's rulers should be.

Mr McDowell said very severe restrictions had been brought in on the amount of money that could be donated by private individuals or entities to political parties.

He said a number of tribunal reports had referred to the question of funding of political parties.

Only a certain amount of money could be donated before it had to be reported.

In 2014, he said the entire amount of donations to all political parties which exceeded the disclosable limit was just over €166,000. Of this, Fine Gael received €102,000.

He said Fianna Fáil received no donations over the disclosable limit in 2014. He said a decision to forego half the State funding by failing to comply with gender quota legislation would be a pretty serious decision for a party.

He said this provision of the legislation was not a condition of funding but a penal sanction.

The State funding was a very substantial sum of money, which would be very difficult to get anywhere else.

Mr McDowell said at the moment Fianna Fáil received €1.1m per annum, based on its share of the vote. If it did not meet the gender quota requirement, its funding would go down to €550,000.

The State argues that Mr Mohan has no legal standing to take this case and only the Fianna Fáil party can take the legal challenge.

Mr Mohan argues he has been directly affected and prejudiced by the legislation.