Image copyright Other Image caption Ryan McGreechan attacked an elderly woman at her Newtownards home

A teenage offender who raped a 76-year-old woman can now be named as Ryan McGreechan, after the BBC went to court to challenge the terms under which his name was kept from the public.

The pensioner was attacked in her Newtownards bungalow after she left her front door unlocked.

She had been expecting a visit from her care worker. She died later that year.

McGreechan, who was 15 at the time, told police he had drunk half a bottle of vodka.

However, he refused to discuss the assault during police interviews.

His lawyers had argued that his name should be kept out of the public domain to give him a better chance of reintegrating into society when his sentence is over.

On Sunday evening 13 March 2011, the woman was expecting a visit from her care worker and had left her front door open. Instead, McGreechan walked into her home and attacked her.

After raping her, he escaped through a bedroom window, but was spotted by the care worker who had just arrived. At the time of the attack, the pensioner said: "What he done to me, a pig wouldn't have done it".

After her death in October of that year, her daughter said her mother's "spark, determination and character was gone" and that she had been "distressed and humiliated by the attack until she died."

McGreechan's identity was protected because at the time of the offence he was 15 years old.

A Crown Court judge, Geoffrey Miller, ruled on his conviction, that he could be named because of the seriousness of the offence and because the probation service report for sentencing concluded that McGreechan presented a significant risk of serious harm to others.

But McGreechan's legal team then secured an interim injunction to block publication of his details until they could make an appeal.

In the end, the Appeal Court said it had no jurisdiction to hear McGreechan's appeal as no reporting restriction was properly in place in the Crown court. But even if it had, the challenge would have been refused because the interests of open justice were held to firmly outweigh his right to anonymity.

As a result of the case, the Appeal Court has now amended the law to allow both defendants and the media to take the issue of naming a defendant and reporting on their case in the Crown court to the Court of Appeal.

McGreechan, who is now 18, is serving an eight years in custody and three on licence for rape and indecent assault.