Bobby Shmurda's lawyer just pulled a legal rabbit out of the hat -- the rapper has a new opportunity to reduce his prison time.
Shmurda was in court Tuesday with attorney Alex Spiro for allegedly getting caught with a shank behind bars. We're told prosecutors are offering Bobby the chance to plead guilty to a reduced charge of "attempted promoting prison contraband." If he does he could get 1 to 4 years.
Bobby's already serving 7 years for his murder conspiracy case, but if he takes the plea deal for the shank ... the sentence will run concurrently.
Sources close to Bobby say his friends, family and lawyers are all pushing him to take the deal. They're concerned because he's been a loose cannon in court lately.
One of Bobby's counterparts was sentenced to 98 years back in May ... so the possibility of him getting out in anything less than 10 is some damn good deal. Shmurda can think over his decision on the plea until a January 7 hearing.
We reached out to Spiro ... but he had no comment.