A former elementary school teacher in B.C. has given up his licence for life after sending "inappropriate" messages to girls over the course of six months.

The girls were between 12 and 16 years old, according to an disciplinary agreement published online Wednesday. Some were Bryan Cederholm's former students and two were so uncomfortable, they blocked him from contacting them online.

The Office of the Commissioner for Teacher Regulation, the regulatory body for teachers in B.C., did not say where Cederholm taught, but CBC has confirmed the school is in the Kamloops-Thompson School District.

The messaging began in late 2016, months after he'd already received a warning from his school district.

Contacted 5 teenagers

A 13-year-old former student said Cederholm messaged her on various social media platforms between October 2016 and January 2017, sending an inappropriate message at least once.

That same January, the agreement said, Cederholm started reaching out to two more girls he'd also taught when they were in elementary school. They were both 14.

The ruling said he sent one of them a photo he'd taken of the elementary school students he was teaching at the time. The second blocked Cederholm on Instagram after he tried to contact her there.

In March 2017, Cederholm "exchanged inappropriate" messages with a fourth former student, who was 12.

One of the teenagers blocked her old teacher on Instagram after he tried to contact her there, according to the disciplinary agreement. (Manan Vatsyayana/AFP/Getty Images)

Cederholm's behaviour had already resulted in a two-day suspension without pay by the end of February 2017, but the district fired him on March 16, 2017, after the fourth incident came to light.

​After he was fired, a parent came forward to report more inappropriate conduct.

The parent said Cederholm contacted their 16-year-old daughter over the course of a week in the 2016-17 school year. The agreement said the teacher also showed the student text messages in which he was talking to someone else about her.

That student also blocked Cederholm on social media.

The ex-teacher gave up his licence to teach on May 9, 2017. He agreed he'll never reapply as part of the disciplinary agreement published Wednesday.

The ruling noted the district had "advised" Cederholm "refrain from having inappropriate contact with students" in early 2016, but did not say what prompted the warning. It also did not elaborate on the nature of the "inappropriate" messages.