Fergus O’Hanlon also denied he was driving the Ford Mondeo registered to Mr Wilson on the day Marioara Rostas disappeared in 2008.

The Central Criminal Court heard Mr O'Hanlon was a convicted criminal who had been given immunity from prosecution.

Mr O'Hanlon (37) was being cross-examined this afternoon by counsel for the defence in the trial.

Mr Wilson (35), of New Street Gardens, Dublin 8, has pleaded not guilty to murdering Marioara (18) at Brabazon Street, The Coombe, between January 7 and 8, 2008.

She went missing while begging in traffic in Dublin city centre on January 6 that year and her body was found in a shallow grave in woods in the Kippure-Sally Gap area on the Dublin/Wicklow border four years later, on January 23, 2012.

In cross examination, Michael O’Higgins SC, for the defence, told the jury he was going to ask Mr O'Hanlon a series of questions so they could “assess his credibility.”

Mr O’Higgins said gardai had made enquiries and established he had not collected his disability payment from the post office on January 8. He had said in direct evidence he was there to collect his disability when he was called back to Brabazon Street and shown Marioara's body.

He replied he had only said he was there “for the purpose” of collecting his money, not that he actually collected it.

Another thing gardai had checked was Mr O’Hanlon’s account of a receipt in the green bag that Mr Wilson allegedly used in the disposal of the body.

Gardai had gone to Woodie’s and found their receipts did not have green stripes on them, as Mr O'Hanlon had said.

Mr O’Hanlon refused to take part in an identity parade after he was arrested on suspicion of having information about the crime in 2008.

Mr O’Higgins asked why not, if he knew he had nothing to do with the murder and “knew Alan Wilson had done it.”

“I refused to be picked out by mistake,” he replied.

Asked if he had ever been violent to a woman, he accepted a girlfriend’s ribs had been broken but said he did not do it and she “might have fallen against something.”

He denied shooting two hospital security guards 24 hours after witnesses heard him make threats that he would do so and calling them "Paki b***ards and Muslim rapists".

He denied “having a problem with dark-skinned people, Muslims and non-nationals.”

He said he was staying in Tallaght the night before a fire at the house on Brabazon Street on February 27, 2008.

He denied having anything to do with the fire. Asked if it was a coincidence that a house was made available through a friend for him to move into immediately after a fire at Brabazon Street, he said: “I found it very convenient, I knew nothing about it.”

Mr O’Hanlon denied that he had ever fired a bullet from a firearm.

Asked about the kind of home evironment there was for his family at Brabazon Street, Mr O’Hanlon admitted having described it to gardai as a drugs “shooting gallery.”

He denied the house was a “brothel,” after gardai put it to him this activity had taken place in Maxine Wilson’s absence.

Mr O’Hanlon confirmed that Marioara was “not the only unfortunate woman to die” in the house. He explained another girl had overdosed there.

He did not know if the alleged killing of Marioara in the house was the first time shots had been fired there.

The court heard Mr O'Hanlon had been given immunity from prosecution but he could not recall if he had asked for it.

Mr O'Hanlon denied that he had ever "wrestled" with his partner Maxine Wilson over a shotgun in the house or that she shot him with it.

The court heard Mr Wilson had given him his Ford Mondeo when he was finished with it. Mr O'Hanlon said he "believed" he took possession of it in April that year. He denied driving it on January 6 to his methadone clinic at Trinity Court, near Lombard Street, where Marioara was last seen.

Mr O'Higgins put it to him that he was a "lesser witness" because he was a compulsive liar.

He denied this.

"You can make up all this to discredit me but I was there, you weren't," Mr O'Hanlon told Mr O'Higgins.