Phillip Evans, prosecuting, said the students were from Saudi Arabia and had come to the city to study.
Akalwaya and his accomplice, who has not been identified, approached the pair and engaged them in conversation.
Mr Evans said the defendant then said to them: “I don’t want to stab you but I will stab you. Give me some money.”
Drink driver goaded police during dangerous chase across Leeds
The victim fought back and suffered cuts and a bruising to his hand.
The robbers managed to take the victim’s wallet..
The prosecutor said the student then offered to give the attackers some money for the return of the wallet.
They went with him to a cash machine nearby and were unaware that the victim was in contact with the police on his mobile phone.
Akalwaya was arrested by police officers near to the cash machine but the other man managed to run away.
The victims provided statements to the court describing how they are now fearful of going out in the city.
Akalwaya, 22, of Dawgreen Avenue, Crigglestone, Wakefield, pleaded guilty to robbery, attempted robbery and possession of a class A drug.
He has four previous convictions for robbery and one for wounding.
He was jailed for 32 months in 2018 for robbing a woman at Batley railway station and was out of prison on licence at the time of his latest offences.
Andrew Walker, mitigating, said Akalwaya pleaded guilty to the offences at an early stage.
Mr Walker said his client and the other man targeted the victims on the spur of the moment and had not planned the offending.
Akalwaya was jailed for three years and eight months.