Abortion legislation in Northern Ireland is in breach of human rights law, the Belfast High Court has ruled.
Currently, termination of pregnancy is only allowed if a woman's life is at risk or there is a permanent or serious risk to her mental or physical health.
The Northern Ireland Human Rights Commission (NIHRC) brought the case to extend abortion to cases of serious foetal malformation, rape or incest.
The 1967 Abortion Act does not apply to Northern Ireland.
A judicial review found the grounds for abortion should be extended in Northern Ireland.
Northern Ireland's Attorney General John Larkin said in a brief statement that he was "profoundly disappointed" by the decision and was "considering the grounds for appeal".
In his ruling on Monday, Mr Justice Horner said women who were the victims of sexual crime and cases of fatal foetal abnormality were entitled to exemptions in the law.
He said given that the issue was unlikely to be addressed by the Northern Ireland Executive in the foreseeable future, and that Northern Ireland citizens were entitled to "have their [European Convention on Human] rights protected by the courts", the current legislation was in breach of their human rights.
Analysis: BBC Ireland correspondent Chris Buckler
Northern Ireland has been a place apart within the United Kingdom since the 1967 Abortion Act.
It allowed terminations in England, Scotland and Wales at up to 24 weeks of the pregnancy on a variety of grounds, including having abnormalities that could lead to a child being "seriously handicapped".
Even if this judgement is put into effect - and it is likely to be appealed - the law would still be stricter in Northern Ireland.
The judge made a point of distinguishing between fatal foetal abnormalities, which he ruled should be an exemption to the law and cases where the foetus was "seriously malformed", which he said should not be exempted.
In effect he was marking a difference between babies who could not survive birth and those who could.
However, this may mean that the Stormont Executive has to consider new legislation and the political divide at the assembly over abortion is deep.
That is not a surprise in a place where politics and religion are often seen as intertwined.
Ahead of this judgement Northern Ireland's justice minister had ruled out changes to the law in cases where rape or incest led to pregnancy. That will now have to be reconsidered.
The issue came to prominence in 2013 when Northern Ireland woman Sarah Ewart shared her personal story of how, at 20 weeks pregnant, she travelled to England for an abortion after her baby had been diagnosed with anencephaly, a condition in which the brain has not developed.
Under the abortion law in Northern Ireland, she was advised that as her health was not at risk she would have to carry the baby full term.
After she told her story to the BBC, then health minister Edwin Poots asked his officials to consider the case.
Sarah's mother, Jane Christie, welcomed the ruling.
"It's not excitement or delight, but just sheer relief that Sarah and women like her are now going to get the medical treatment that they should have been getting from the outset," she said.
"Sarah herself, it will enable her to move on with her family.
"She is only 25 years of age and Sarah wants more family so unfortunately with medical things that she's going through at the moment, her body isn't functioning right and we're up against it before we even have to think about pregnancy, so it is a major issue for us.
"When Sarah was putting together her submission and all the casework that had to go in and the ups and the downs, it was very evident that it gave the judge an insight into what we had actually been through."
Last year, Northern Ireland's Department of Justice carried out a public consultation on changing the law to allow abortion in cases of fatal foetal abnormality.
However, the NIHRC claimed the consultation paper did not go far enough and said it had brought the legal proceedings as a last resort.
After Monday's ruling, NIHRC chief commissioner Les Allamby said: "Today's result is historic, and will be welcomed by many of the vulnerable women and girls who have been faced with these situations.
"It was important for the commission to take this challenge in its own name, in order to protect women and girls in Northern Ireland and we are delighted with the result."
Justice Minister David Ford said Monday's ruling was complex and would need careful consideration.
"However, I note that one of the conclusions reached by the court appears to align with my policy proposal to amend the law to provide for abortion in cases of fatal foetal abnormality," he said.
Amnesty International said the decision was a "hugely significant step".
"It's shameful that the courts have had to step in because politicians have repeatedly failed Northern Ireland's women," said Grainne Teggart, from Amnesty.
Anti-abortion campaigner Bernadette Smyth, of Precious Life, said: "This is an undemocratic decision today - it will clearly see, long term, the opening of the floodgates."
In a joint statement, the Catholic Bishops of Northern Ireland described the ruling as "profoundly disquieting".
"To deliberately and intentionally take the life of an innocent person continues to be gravely morally wrong in all circumstances," the bishops said.
A judicial review hearing was held over three days in June, but the court waited until now to deliver its verdict.
The Department of Justice has six weeks to decide whether to appeal the judgement.