A former Liversedge man was given a 12-month community rehabilitation order for possessing crack cocaine at Leeds Crown Court on Friday.
Mohammed Riaz Khan, formerly of Union Road, Liversedge, whose current address was given as a hostel in Huddersfield, faced a charge of possessing heroin with intent to supply but the court heard he did not know his friend Kaleen Akhtar, had heroin on him.
Khan, 29, pleaded guilty to possessing cocaine at an earlier hearing.
Akhtar, 26, had earlier pleaded guilty to possessing heroin but not with intent to supply because he had picked up the drug for someone else.
Prosecutor Sean Morris said police who were keeping observation on a house in Batley known to be used by drug addicts saw Akhtar, of Staincliffe, leaving the house with Khan.
Khan and Akhtar then drove to Bradford where Khan bought cocaine and Akhtar bought 129 wraps of heroin. They then drove back to the house and were approached by police.
"Akhtar was seen to throw a tennis ball sized package and kick it away," said Mr Morris.
It was later found to have 129 wraps of heroin in it. The defendants were arrested and interviewed by police.
In his interview Akhtar said he knew nothing about the drugs but had found them on the ground and picked them up. Khan admitted he had bought cocaine but said he knew nothing about the heroin.
Imran Shafi, mitigating for Akhtar, said he had entered a guilty plea on the basis he was an addict looking for his next fix.
He said: "In these circumstances I would submit that he was manipulate by someone who is a real criminal and who is more criminally sophisticated than Mr Akhtar."
He said Akhtar had done well to stay away from crime and had agreed to be a courier for just two wraps of heroin in return. He added he was very low down in the drug chain and manipulated by those higher up than him.
Judge Peter Benson accepted that Khan had gone to buy cocaine for his own use and was not involved in buying the large amount of heroin.
He said Khan was already subject to a community rehabilitation order until August next year but he sentenced him to another 12-month community rehabilitation order to run concurrently until October 24 next year. He said although Akhtar did not intend to sell the heroin he had gone back to give it to a dealer who would sell it.
"Anybody who plays a part in the supply chain of heroin, no matter how minor or far down the line must expect to be dealt with severely in these courts," he said. Akhtar was jailed for three years.