Mr Rogers said he dropped the passenger off on Devon Springs Road and looked in the bag.

He pulled out a glass container and poured it out on to his lap and found it contained drugs.

Mr Rogers said he put the drugs back in the container and the container back into the bag.

A further examination of the bag turned up a firearm.

Mr Rogers said: “The firearm was really what messed me up the most. More than the weed.

“The gun made me realise the seriousness of the situation.”

Mr Rogers told the court he left the bag on the passenger seat and decided to drive home to get the cab off the road.

He said: “My mind was racing. I didn’t know what was the best thing to do. I panicked.”

He added he noticed a twist from the glass container was on the floor of the cab as he drove and that he picked it up and stashed it in the sun visor.

Mr Rogers said the gun later fell out of the bag on to the floor of the taxi.

He added that he picked it up with a piece of paper and put it in a compartment on his side of the vehicle.

The bottle also fell out of the bag and he placed that in another compartment.

Mr Rogers said he hid the bag beneath the driver’s seat when he arrived home to keep it out of view and told no one about the bag or its contents.

Mr Rogers said: “I didn’t want anybody in the house to know what I was dealing with at that time.”

He told the court he decided the next morning he would go to the police station, but police came to his home before he had the chance.

Mr Rogers said: “My mind was made up. It was about how to do it without repercussions. I was looking for the best way to do it. I thought I had more time then I had.”

Mr Rogers, 37, was arrested on November 12, 2016 after a Smith & Wesson automatic pistol, cannabis and cocaine were discovered in the cab.

Police also found $78,024 in cash in his Pembroke home, which prosecutors said was the proceeds of crime.

But Mr Rogers said the money was his savings from several years of work and he kept the money at home because he did not trust banks.

Larry Mussenden, the Director of Public Prosecutions, said Mr Rogers’s story made no sense and questioned why he had not put the glass container and pistol back into the bag when they fell out.

Mr Mussenden also asked why Mr Rogers had not left the bag somewhere and told police about it.

Mr Rogers said, in hindsight, that would have been a good idea.

The trial continues.

• It is The Royal Gazette’s policy not to allow comments on stories regarding court cases. As we are legally liable for any libellous or defamatory comments made on our website, this move is for our protection as well as that of our readers.