A drunk passenger pulled at the handbrake of a taxi before dragging out and punching the driver, a court heard.
The passenger Benjamin Taylor, 28, was found guilty and jailed following the trial.
Taylor, who was said to be 'incredibly drunk' at the time of the attack, had been out drinking in the Northern Quarter of Manchester city centre.
The taxi driver picked him up outside the Millstone pub in Thomas Street who sat in the back of the vehicle asking to be taken to Newton Heath on 17th August 2017.
Suddenly during the journey Taylor grabbed the handbrake and punched the driver in the back of his head and shoulder.
The cab came to a stop at the entrance of a factory where Taylor then got out and dragged the driver out of his seat punching him.
The passenger then told the driver to give him the keys to the vehicle.
A passing police car at the time pulled over after being alerted by the cabbie shouting for help.
According to Manchester Evening News police officers described Taylor as being 'incredibly drunk' and was detained.
The drunk passenger told court that the cabbie had allegedly asked for more money to be paid after agreeing to pay for the fare up front.
He then claimed that the driver got out of the cab shouting. He said he couldn't remember what happened next and denied trying to rob the taxi driver of his keys.
The prosecutor Hayley Bennett read out a statement from the driver saying: "This incident has made me more nervous when working at night.
"It has made me more worried at collecting fares from the city centre, but I have to do this to make a living."
The 28-year-old was convicted by a jury of attempted robbery. Taylor, also had previous convictions for being drunk in public, racially aggravated harassment and assault.
The court was told that he drinks 'three bottles of spirits over a weekend on average', of which may be an 'understatement'.
Upon sentencing, Judge David Hernandez told Taylor: "Without drink you are probably a very pleasant individual.
"But when in drink your personality changes and you become aggressive and act impulsively.
"The taxi driver was clearly very distressed by what happened. He was going about his lawful business.
"He was vulnerable, and you took advantage of that.
"Lone taxi drivers working at night have to be protected. There must be an immediate custodial sentence."