A gun-wielding teacher who shot an air pistol at a group of teenagers urinating in his neighbour's garden has been allowed back into the classroom. 

Allan Dickson admitted two firearms offences at Edinburgh Sheriff Court in 2009 and was fined £1,000. 

The secondary school maths teacher, who was 33 at the time of the hearing, was struck off the teaching register in 2010 after admitting the offences. 

The court heard how Dickson had been drinking with friends when he confronted the group of young men who were urinating in a neighbours garden back in 2008. 

Dickson fetched the weapon from his house in Edinburgh and fired a shot at a metal fence knowing it would make a lot of noise. 

The then teacher at Newbattle Community High, Dalkeith, Midlothian, claimed the two men then assaulted him. 

But it has now emerged the General Teaching Council for Scotland (GTCS) has agreed to allow Dickson, now 41, back into the classroom, following a hearing last month. 

In newly released details from the hearing, Dickson is said to have expressed his "desire to return to teaching". 

Notes from the meeting state: "He [Dickson] indicated that he had learned from the experience and, as a result of his conviction and subsequent removal from the register, he had lost his job and professional reputation. 

"He stated that he is determined to restore this and demonstrate to his family and friends that he is capable of resuming his career as an effective Mathematics teacher." 

Dickson said he was "deeply ashamed by his behaviour and the impact this had on him." 

The dad of two, who previously confessed to having a drinking problem, also said he had given up alcohol and had not been in any other trouble since the incident in 2008. 

Dickson was dismissed as a teacher by Midlothian Council after news of the incident came to light. 

However, during the hearing it emerged that Dickson has been working in a managerial role at the same local authority arranging council transport. 

Further details from the hearing said: "He stated that he greatly missed teaching Mathematics. 

"He spoke highly of his former school and the pride he had taken in his job and position there. 

"He regarded himself as a good teacher who was popular with pupils and staff. 

"After eight years he believed he was now ready to return to teaching and positively contribute to the profession he loved." 

The panel decided to allow Dickson back into the classroom but said he will need to complete a probationary year in order to regain his full teaching licence. 

On making the decision, the panel said: "It was now some eight years since the incident occurred and the applicant was now a more mature individual who was devoted to his family. 

"He had clearly retained a love for teaching and Mathematics."