A woman boarded a bus in East Kilbride to find another passenger bleeding from a face wound and carrying a knife.
She alerted the police and James Fisher was later seen throwing the blade into bushes outside Hairmyres Hospital.
Fisher, 21, appeared from custody at Hamilton Sheriff Court and admitted carrying a flick knife on December 28.
Jennifer McCabe, prosecuting, said the female boarded the bus in the town centre about 2.25pm.
She noticed Fisher sitting alone, with injuries to his face.
He asked the woman to phone his sister and arrangements were made for him to attend hospital.
Ms McCabe told the court: "The woman then noted that he had a flick knife in his right hand.
"She got up from her seat before her stop and walked towards the front of the bus.
"The accused followed, but she told him his stop, Hairmyres, was the last one on the route.
"She got off, went home and contacted the police."
Officers went to the hospital and searched Fisher outside A&E, but found nothing.
The fiscal added: "A hospital security guard watching CCTV saw the accused acting erratically, trying to open doors and pacing about.
"He was seen throwing something into bushes. Police officers were advised and a flick knife with a three-inch blade was recovered."
Sheriff Colin Dunipace deferred sentence for a criminal justice social work report and Fisher was remanded in custody.
*Don't miss the latest headlines from around Lanarkshire. Sign up to our newsletters here.
And did you know Lanarkshire Live had its own app? Download yours for free here.