police are hunting an armed raider who came off second best when the tables were turned on him by a brave shopkeeper.

The hooded robber burst into the store brandishing a 12-inch blade and ordered Muhammad Kashif to hand over the day's takings.

But rather than surrender any cash to the would-be thief, Mr Kashif smashed him over the head with a window pole.

The confrontation left the ­knifeman bloodied during the bungled robbery attempt at the small newsagents in Bonnyrigg, Midlothian.

Police Scotland has now launched a manhunt for the knifeman, who fled the shop with a possible "wound or injury to his head".

Officers ­immediately closed the shop and scoured the streets looking for the man, but he had disappeared from the scene.

Officers are now checking CCTV footage of the incident, which took place at around 7.05pm on Thursday evening.

Mr Kashif, 22, who lives in ­Edinburgh, admitted he was "a bit scared" during the raid at his cousin's business, but was determined not to hand over the £500 takings.

He said: "I was watching the news on my phone when he just burst in and started flashing the big kitchen knife about. I was in shock but I was determined he wouldn't get any of our takings.

"He came at me with the knife and I backed off and let him try and open the till, but after a few attempts he just couldn't do it.

"I was just waiting for my chance to grab the pole and when he backed off for a second I managed to get it and smash him over the head with it. I could see he had a cut to his head as I chased him out the shop."

He said the reality of what happened only began to sink in later on.

"It wasn't until afterwards that I thought of the danger I was in - I admit I was a bit scared - but I think I just went into autopilot and tried to protect what was ours," he said.

The would-be robber was last seen clutching his head as he made his escape along the town's Dundas Street before being lost to sight.

Mr Kashif added: "About seven police cars arrived very quickly but unfortunately he had disappeared by then. I think he's either a local or possibly had a car parked nearby."

Police Scotland's Detective Inspector David Pinkney said: "This was a terrifying ­experience for the shop assistant, despite the suspect leaving empty handed."

He urged anyone who was in the area at the time or who recognises the description of the suspect to get in touch immediately.

The suspect is described as white, in his late 30s to early 40s, with stocky or overweight build and a local accent.

He was wearing a blue shiny waterproof style hooded top, with the hood pulled up, when he entered the shop.

In October last year shop assistant Mohammed Abdullah was captured on CCTV tackling an armed intrider at another store in Bonnyrigg.

He needed hospital treatment after being hit in the face with a gun and headbutted.